Go to the FreeLists Home Page Home Signup Help Login
 



Browse oracle-l: This Month's ArchiveMain Archive PageRelated postsPrevious by DateNext by Date

RE: SQL Tunning

  • From: "Mark W. Farnham" <mwf@xxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 3 Aug 2004 12:21:11 -0400
If I knew from your query exactly which records you wanted, this would be
fairly transparent.

I'm guessing you want want anything modified yesterday.

You want to avoid having to have a function-based index on last_update_date
(sounds right to me).

So you want somthing like:

where last_update_date >= trunc(sysdate-1) and last_update_date <
trunc(sysdate)

Right?

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Wes Brooks
Sent: Monday, August 02, 2004 6:13 AM
To: Oracle-L@xxxxxxxxxxxxx
Subject: SQL Tunning


Hello expert,

I have a table with 40 millions records and the last update date is indexed.
But when we use the
following where clause, it takes forever to run the report.

   WHERE TRUNC(last_update_date) = TRUNC(SYSDATE - 1)

How to improve the performance?  Do I need to create a new index field on
the table with TRUNC(last_update_date)?
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------


----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts:

  • SQL Tunning
  • RE: SQL Tunning
  • Re: SQL Tunning
  • Re: SQL Tunning
  • RE: SQL Tunning
  • Re: SQL Tunning
  • RE: SQL Tunning
  • RE: SQL Tunning
  • RE: SQL Tunning
  • RE: SQL Tunning
  • RE: SQL Tunning
  • RE: SQL Tunning




  • [ Home | Signup | Help | Login | Archives | Lists ]

    All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
    Everything else ©2008 Avenir Technologies, LLC.