Subject Re: [firebird-support] Execution plan
Author Alexandre Benson Smith
frederic.hoornaert wrote:

>Hi,
>
>Sorry if this has been asked before, but I haven't found the
>information
>yet, so I'll hope you guys can help me out.
>
>Sybase and Oracle database provide SQL Statements or functions to
>get the
>Execution plan of a query.
>Sybase : select plan('query') from dummy
>Oracle : EXPLAIN PLAN SET STATEMENT_ID = 'PLAN_0001' FOR query
>
>FireBird doesn't seem to have a integrated function which does, but
>some
>newsgroup threads say this is available through an API call.
>
>Anyone knows the name & defintion of the API function that's used to
>get the
>execution plan ?
> Sample code ?
>
>Could this be easily integrated in a C++ DLL and use it as an UDF so
>that it
>can be used in the same way as SQL Anywhere ?
>
>Example :
>select plan('select x from y') from rdb$database.
>
>Kind regards,
>Frederic Hoornaert
>
>
As you know it is available trough API.

The client tools (such ISQL, IBExpert, Database Workbench,, FalmeRobin
and so on) all show you the plan, some in a very easy to understand form.

are you asking how to know what plan is used on the general tools, or
how to get it from inside your app ?

If the later, it will depend on the access componentes you are using.

see you !

--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br