Subject RE: [firebird-support] Retrieve query plan with SQL?
Author Helen Borrie
At 09:05 PM 25/10/2007, you wrote:
>I connect via ODBC with the standard Firebird ODBC driver.
>
>I know I can get the query plan with FlameRobin (didn�t know IB_SQL worked
>with FB as well), but I would like to get it programmatically in VB.

For this, you would need an API translation of ibase.h and iberror.h for VB. I have never heard of anyone having done one.

A select statement is prepared before execution and the plan is returned to the client as a member of the statement parameter block. VB users use the Firebird ODBC or Firebird ADO.Net drivers. Either of these drivers should have a property you can read after the prepare to know what plan the optimizer will use. Ask on the relevant lists if you can't find it in the documentation for these drivers. We don't do driver support on this list.

What is your purpose in trying to get the plan into a user application?

./heLen