Re: TO_DATE function causes table scan

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 31 Mar 2006 08:41:06 -0800
Message-ID: <1143823254.178628_at_yasure.drizzle.com>


dhart_at_t2systems.com wrote:
> Thanks very much for the link, I'll give it a read!
>
> I'm definitely not obessed with the index, and I know 3500 rows is
> nothing. I should have been more specific in my last post on why I need
> the index to work: When in production this table will grow at the rate
> of about 10,000 rows a day so I need to know if the query is going to
> use the index or not.

Then you are going about this in entirely the wrong way. Oracle may well make different decisions about that index over time depending on the number of rows, cardinality, clustering factor, etc.

And you do seem a bit obsessed in that there are plenty of queries that run slower using an index than without ... even as tables grow.

But given your desire to see this thing through ... you need to create enough dummy data to simulate the table at 3 months, 6 months, 1 year, 2 years, and try your query at each level. Testing with 3500 rows is a total waste of time as it doesn't even correspond to one day's worth of data.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Fri Mar 31 2006 - 18:41:06 CEST

Original text of this message