db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bergquist, Brett" <BBergqu...@canoga.com>
Subject Having a problem with XPLAIN
Date Tue, 21 Feb 2012 18:25:38 GMT
Derby 10.8.2.2

The query that I am doing is this:

#!/bin/sh

DERBY_HOME=/opt/canoga/canogaview/glassfish/javadb
export DERBY_HOME

$DERBY_HOME/bin/ij <<EOF

CONNECT 'jdbc:derby://localhost:1527/csemdb';

CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1);
CALL SYSCS_UTIL.SYSCS_SET_XPLAIN_SCHEMA('PCS_V1');
CALL SYSCS_UTIL.SYSCS_SET_XPLAIN_MODE(1);

SELECT
r.MasterIp
FROM PCS_V1.NPAResults r
WHERE ReportKey >= '2012-02-10 00:00:00.0'
AND ReportKey <= '2012-02-14 23:59:59.0'
AND (r.ResultFlag = 0 OR (r.ResultFlag <> 0 AND r.RoundTripPackets > 0));

CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(0);
CALL SYSCS_UTIL.SYSCS_SET_XPLAIN_SCHEMA('');
CALL SYSCS_UTIL.SYSCS_SET_XPLAIN_MODE(0);

EXIT;
<<EOF

The output of this is:

ij version 10.8
ij> ij> Statement executed.
ij> Statement executed.
ij> Statement executed.
ij> > > > > > ERROR XCL16: ResultSet not open. Operation 'getMetaData' not
permitted. Verify that autocommit is OFF.
ij> Statement executed.
ij> Statement executed.
ij> Statement executed.
ij>


So the actual SELECT is returning this error.  When run with "call SYSCS_UTIL.SYSCS_SET_XPLAIN_MODE(0);"
the query is run with no error.

I am trying to get the query plan that would be used without executing the query.

So is this a bug or am I doing something wrong?

Brett

Mime
View raw message