Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: different SQL approaches
Andy Hassall wrote:
> On Sat, 16 Oct 2004 22:07:50 -0700, DA Morgan <damorgan_at_x.washington.edu>
> wrote:
>
>
>>AK wrote: >> >> >>>not nesessarily true if there is data skew or range queries. >>>for instance, considering a table of Illinois customers, >>>WHERE CITY = 'CHICAGO' would require scanning a table (>50% ROWS), >>>while >>>WHERE CITY = 'LISLE' is better off using an index (<0.2% rows) >>>a generic plan WHERE CITY = :city, will use an index (there are >>>hundreds or even thousands of cities), the price of running it for >>>Chicago is quite high, as scanning the whole table with prefetching is >>>way more efficient than accessing the whole table via the index. >>> >>>I'm not discussing cluster factors here just to keep thing simple >> >>While your example is correct if you think the solution is to use string >>literals rather than histograms I would suggest you are using a hammer >>as a screw driver.
You are correct.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Thu Oct 21 2004 - 20:47:53 CDT