Just call executeQuery with EXPLAIN PLAN SELECT.......
On Thu, 11 Jun 2015 at 16:09, Pablo Beltran <pbeltr...@gmail.com> wrote:

> Hi,
>
> i would like to  get the same text jist like the H2 Web Console when a
> plan is explained (Pls, see the attached picture), but I did not get it yet
> unfortunately.
>
>
>
> Connection conn  = ....
>
>
> Statment st = con.createStatment("SELECT * FROM TABLE"),
> st.executeQuery();
>
> ....
>
>
> JdbcConnection jdbcConnection = (JdbcConnection) conn;
> Session session = (Session) jdbcConnection.getSession();
> Command current = session.getCurrentCommand(); //this method has been
> added to the Session class.
> Parser parser = new Parser(session);
> Prepared prepared = parser.prepare(current.toString()); //SELECT * FROM
> TABLE
> Explain exp = new Explain(session);
> exp.setCommand(prepared);
>
> and next??
>
> I've tried several things from here but without too much success.
>
> Any idea?
>
> Thanks in advance!
> Pablo.
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> 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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to