Subject Re: slow join?
Author bwc3068
Hi--

Thanks for the "set statistics index" tip....that did it.

I realize such a large query is usually not performed BUT the users have the ability to do a system wide analysis which means all the data. Hence the large result.

In this specific database, there was a reliefd record for each part record. In the other, similar sized DB that returned far quicker, that was not the case...some parts belonged to records in a different table. Hence the record counts didn't match.

After I did the "set statistics index", the result returned in about 50 seconds instead of the 25 minutes I was seeing. I didn't add any indexs or anything, just itterated through all tables and all existing indexes for them doing that. I trust that is how i should've done it?

Thanks!
Kelly




--- In firebird-support@yahoogroups.com, "emb_blaster" <EMB_Blaster@...> wrote:
>
> >> The big time difference that you observe, will normally be due to different PLANs being chosen (particularly if the only difference is the data).
> >>
> >> Set
> >>
> > -----Original Message-----
> >
> > Hi--
> >
> > On a different database file
> (...)
> > Same indexs, same tables, same records, etc. Just different data.
> (...)
> > Kelly
>
> Hi Kelly,
> donĀ“t know how much deep you are in it, but only addinig in SET comment:
> differents plans may be because of index selectivity...
> you can try SET STATISTICS indexname; on all index of the tables in yor select.
> if solves your problem, take a search in old messages here, you will see many usefull info.
>
> Regards,
>