Re: SQL code question

From: Mike J Cox <mike_at_kane.demon.co.uk>
Date: 1995/08/12
Message-ID: <87324304wnr_at_kane.demon.co.uk>#1/1


> awdorrin_at_ictest.delcoelect.com (Albert W. Dorrington) wrote:
>
> Albert,
>
> The moment you introduce the substr function you query will do a
> sequential scan of the database. Your index is not helping at all.
>
>

Bollox, the substr is in the select and not on the where clause, it is only activated once that data has been 'retrieved' and therfore does not affect the performance.

Try running the whole thing through explain plan and see which indexes it is using, is possible run it through tkprof with explain plan for the best statistics.

There are a couple of things though

1 It maybe that the times you are enter retrieve a large amount of data, try using a v small time range

2 Swap that tables around so that it drives off tablea, just in case it is trying to drive off tableb

Mike Received on Sat Aug 12 1995 - 00:00:00 CEST

Original text of this message