Subject | RE: [firebird-support] Retrieve query plan with SQL? |
---|---|
Author | Helen Borrie |
Post date | 2007-10-25T11:05:20Z |
At 08:53 PM 25/10/2007, Set wrote:
SQL>set plan off;
SQL>set planonly on;
Now, your select query will not execute but will return the plan in a form that you can copy-paste as a PLAN clause
./heLen
>You haven't said how you connect to Firebird. Myself, I use Delphi with IBO, and that is very different from using Delphi with other component sets. But for getting a query plan, I normally just prepare my query in DB Workbench. The same thing should be possible using freeware tools like IB_SQL (I know this is easy) or FlameRobin (which I haven't tried). isql (part of Firebird) should also have some way of preparing queries, I think.In isql:
SQL>set plan off;
SQL>set planonly on;
Now, your select query will not execute but will return the plan in a form that you can copy-paste as a PLAN clause
./heLen