Hi Thomas,
Thanks for your quick response.
Maybe I should clarify more about my case. I will add the "explain analyze"
to the sql, but how to get the result string? Let's look at a general
situation:
* ResultSet rs = statment.execute("select * from MyTable");*
* while(rs.next()) {*
* //handle the info stroed in rs.*
* }*
In the above case, we can fetch the result from the ResultSet.
But for the bellowing statement, how to get the result and handle it(I just
want to display the result on stdout?
* ResultSet rs = statment.execute("explain select * from MyTable");*
Thanks very much.
BR//Kriss
在 2015年5月9日星期六 UTC+8上午12:12:07,Thomas Mueller写道:
>
> Hi,
>
> Do you mean, how to get the information without having to change the SQL
> statements (without adding "explain analyze")? You can't.
>
> Regards,
> Thomas
>
>
> On Friday, May 8, 2015, Kriss Lu <[email protected] <javascript:>> wrote:
>
>> I am tracing the performance of a program with "explain analyze" command.
>> I run this command in H2 console, and itt does give many useful
>> information like that:
>>
>> EXPLAIN ANALYZE SELECT * FROM TEST;
>> SELECT
>> TEST.ID,
>> TEST.NAME
>> FROM PUBLIC.TEST
>> /* PUBLIC.TEST.tableScan */
>> /* scanCount: 1000 */
>> /*
>> total: 85
>> TEST.TEST_DATA read: 85 (100%)
>> */
>>
>>
>> But how to fetch the output in a running program? I operation the H2
>> with JDBC.
>>
>> Thanks in advance.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "H2 Database" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.