Subject | Re: MAKE 'EXECUTE STATEMENT' USE INDEX |
---|---|
Author | Dmitry Yemanov |
Post date | 2015-08-19T13:18:37Z |
19.08.2015 14:29, 'Mr. John' wrote:
being used, so only first two index segments are used for the retrieval.
This is absolutely expected.
Dmitry
> This time,adding condition this way WHERE FIEL1=:F1 AND FIEL2=:F2 ANDbecause all three index segments are used for the retrieval.
> * (FIEL3=:F3 OR **:F3 IS NULL) * INTO .. DO ..
>
> is causing query to be much slower ...
>
> this WHERE FIEL1=:F1 AND FIEL2=:F2 AND * (FIEL3=:F3 **) * INTO .. DO ..
> takes *0.563s*
> but this takes *29.141s*because (FIEL3=:F3 OR :F3 IS NULL) prevents the third index segment from
> WHERE FIEL1=:F1 AND FIEL2=:F2 AND * (FIEL3=:F3 OR **:F3 IS NULL) * INTO
> .. DO ..
being used, so only first two index segments are used for the retrieval.
This is absolutely expected.
Dmitry