Subject | RE: [firebird-support] Slow descending order select on joint tables |
---|---|
Author | Leyne, Sean |
Post date | 2006-09-18T21:53:21Z |
Sean, (What a great name!)
So, you're query is performing a full join for both tables, then
returning the first 250 rows.
Sean
> I need to furtherly join table_A to a small table with only 5 records.The FIRST predicate is evaluated based on the *results*.
> Now the query is revised as:
>
> select first 250 * from table_A A
> left join table_B B
> on A.column = B.column
> where A.time > sometimestamp
> order by A.ID desc
>
> Now it takes more than 1 minute :-(
>
> Can anyone please point out what is missing here?
So, you're query is performing a full join for both tables, then
returning the first 250 rows.
Sean