Subject | Re: How to retrieve execution plan? |
---|---|
Author | harri007et |
Post date | 2004-02-17T21:23:45Z |
> Good lord, that's 17 tables :/ (joining views does join the views'compex
> original select select queries, doesn't it?) I can't imagine such
> query and thus i can't hel you with it.basically there are 3 main tables, which have various parameter
colums coded as integers - these integer columns are linked to
smaller tables (ID, DESCR), plus main tables have other columns of
course (date, char(1) for Y/N etc.)
so without view, it could still be considered as simple as a 3-table
join, because where clause does contain columns only from main three
tables
and the view has a join to the original table the view is based on,
because "select * from _view JOIN .. where .." didn't use indexes at
all :(
> BTW, wouldn't BETWEEN be faster than IN(1 ... n) ? (I have littleprobably, but in my case these numbers inside IN(..) are not
> experience, i admit)
sequential, the example was more like a stress test
Thanks a lot for code sample :) I'll try it as soon as I get my
linux box working again
best regards,
Harri
p.s. You asked in another message about FIBPlus.
You were right - but it's even easier:
..
try
FBQuery.SQL := 'Select ...'
FBQuery.Prepare;
showmessage(FBQuery.Plan);
finally
if FBQuery.Prepared then
FBQuery.Close;
end;
..
unfortunately I discovered this only after asking here and wasting
everyones time :( should have tried "grep -i -d Plan *.pas" before
asking