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

Home -> Community -> Mailing Lists -> Oracle-L -> Re:

Re:

From: Carel-Jan Engel <cjpengel.dbalert_at_xs4all.nl>
Date: Mon, 2 Aug 2004 12:31:07 +0200 (CEST)
Message-ID: <13753.145.61.28.21.1091442667.squirrel@webmail.xs4all.nl>


And David should be Edgar......

Need another coffee.

Regards, Carel-Jan

===
If you think education is expensive, try ignorance. (Derek Bok) ===

> You can also create a function based index on TRUNC(last_update_date), but
> w/o any changes to your tables and/or indexes rephrasing the query to
> WHERE last_update_date BETWEEN TRUNC(SYSDATE - 1) AND TRUNC(SYSDATE -
> 1/86400)
> will make an index-range scan possible. The 1/86400 is to subtract 1
> second of the SYSDATE, to prevent including the 0:00:00 updates of today.
>
> Regards, Carel-Jan
>
> ===
> If you think education is expensive, try ignorance. (Derek Bok)
> ===
>
>
>
>> 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_at_freelists.org
>> 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_at_freelists.org
> 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_at_freelists.org 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
-----------------------------------------------------------------
Received on Mon Aug 02 2004 - 05:27:06 CDT

Original text of this message

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