Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Index Question
Muggle wrote:
> When the input contains only non-indexed colums , I am being told to
> append "And (date_column_A between sysdate-7 and sysdate) " to the
> query to avoid a full scan of the table.
It might ... it might not. That it will do so is an assumption that needs to be tested.
> My question is would it reallly help ? And if yes, is defaulting the
> indexed column range to (sysdate-7 and sysdate) better than defaulting
> it to , say, (sysdate-30, sysdate) ?
Again it depends.
> Please note I have no control over the overall design of the
> application. Oracle used here is 8.17.
8.17 is not an Oracle version numbering on which much can be said. Hopefully it is 8.1.7.4 and hopefully you will find yourself a job with a version of Oracle that has been supported during the current millenium.
That said ... without knowing your data no one can answer the question. You need to stop asking unanswerable questions and use EXPLAIN PLAN and common sense. Might I suggest you purchase Cary Millsap's and Jonathan Lewis' books.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Thu Feb 08 2007 - 10:29:12 CST