You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by sreedish <sr...@gmail.com> on 2011/10/20 09:13:35 UTC

Statistics are not capturing in XPLAIN- only mode

The information about query execution plan is not getting captured in
sysxplain_* tables in the XPLAIN-only mode . But the statistics are captured
perfectly if the queries are executed . I need to get the query execution
plan without actually executing it . Please help . 

Error shown when I give a query in XPLAIN-only mode is 

select * from physicsmarks where P_Id = 34567 ;
ERROR XCL16: ResultSet not open. Operation 'getMetaData' not permitted.
Verify that autocommit is OFF.

I tried with autocommit OFF , but still giving same results . The
sysxaplain_* tables are empty after this . Please help . 
-- 
View this message in context: http://old.nabble.com/Statistics-are-not-capturing-in-XPLAIN--only-mode-tp32687539p32687539.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Statistics are not capturing in XPLAIN- only mode

Posted by Bryan Pendleton <bp...@gmail.com>.
On 10/20/2011 12:13 AM, sreedish wrote:
>
> The information about query execution plan is not getting captured in
> sysxplain_* tables in the XPLAIN-only mode . But the statistics are captured
> perfectly if the queries are executed . I need to get the query execution
> plan without actually executing it . Please help .
>
> Error shown when I give a query in XPLAIN-only mode is
>
> select * from physicsmarks where P_Id = 34567 ;
> ERROR XCL16: ResultSet not open. Operation 'getMetaData' not permitted.
> Verify that autocommit is OFF.
>
> I tried with autocommit OFF , but still giving same results . The
> sysxaplain_* tables are empty after this . Please help .

Sounds like a bug, unfortunately. Perhaps you could open a JIRA issue and
one of the developers can spot what's wrong.

Things that would help:
- include a short script that fully reproduces the problem from scratch in ij.
- include the full stack trace of the error, and include the derby.log file
- identify which version, precisely, the problem occurs in, and which other
   versions you have tried

As a workaround, since I believe this functionality used to work correctly,
you could try going back to an older release of Derby for your development
work and see if you can get the XPLAIN processing to work in the older version.

thanks,

bryan