Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to optimize this query?

Re: How to optimize this query?

From: <ctcgag_at_hotmail.com>
Date: 11 Aug 2003 23:28:05 GMT
Message-ID: <20030811192805.457$sQ@newsreader.com>


vslabs_at_onwe.co.za (Billy Verreynne) wrote:
>
> This will be a bit slower, but should still be acceptable:
> SELECT
> count(*)
> FROM t
> WHERE surname BETWEEN 'SMITH' and 'SMYTHE'
> AND age BETWEEN 20 and 30

Out of curiousity, if there's an index based on (surname, age), might Oracle decide to combine a range scan on surname with a skip-scan on age for only things in the right surname range?

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service              New Rate! $9.95/Month 50GB
Received on Mon Aug 11 2003 - 18:28:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US