Subject | Re: slow query |
---|---|
Author | Stephen Boyd |
Post date | 2009-08-09T12:57:11Z |
--- In firebird-support@yahoogroups.com, Svein Erling Tysvaer <svein.erling.tysvaer@...> wrote:
PLAN SORT ((BILLING_IMG_TABLE INDEX (BILLING_PRO_KEY)))
which is what I would expect. This tells me that the index is enabled and usable. In fact this is the same PLAN that is reported when I specifically name BILLING_PRO_KEY in a PLAN clause.
The above query returns the result almost immediately, which is also what I would expect.
There are no NULL keys in this index.
>The plan for the above query is:
> What's the reported plan (and query speed) if you try
>
> SELECT *
> FROM BILLING_IMG_TABLE
> WHERE LOCATION = 'XX' AND NUMBER = 123 AND IMAGE_TYPE = 'XX'
> ORDER BY AS$IMAGE_NUMBER+0;
>
PLAN SORT ((BILLING_IMG_TABLE INDEX (BILLING_PRO_KEY)))
which is what I would expect. This tells me that the index is enabled and usable. In fact this is the same PLAN that is reported when I specifically name BILLING_PRO_KEY in a PLAN clause.
The above query returns the result almost immediately, which is also what I would expect.
There are no NULL keys in this index.