Re: Full table scans with Date fields

From: Dave Schweisguth <dcs_at_proton.chem.yale.edu>
Date: 1997/05/22
Message-ID: <5m2dbf$hm7_at_news.ycc.yale.edu>#1/1


Stacey Knight (sknight_at_aegonusa.com) wrote:
: We have a financial system that that is heavily date-dependent. All calcs,
: queries, imports, database triggers, etc are date-dependent.

:

: The problem is that we only reference the date portion of the date and not
: the time. To do this, the entire system uses the TRUNC(DATE) function and
: this causes full table scans in every imaginable situation, therefore, the
: performance is horrible in nearly every aspect.

Add a truncated-date column to each table with a date and a trigger to maintain it. Insert into your full-date column, but select from the truncateddate  column.

Cheers,

--
| Dave Schweisguth                        For purposes of complying with    |
| dcs_at_proton.chem.yale.edu (MIME OK)      the New Jersey Right to Know Act: |
| http://proton.chem.yale.edu/~dcs/       Contents partially unknown.       |
| Yale Depts. of MB&B & Chemistry   Phone: 203-432-5208   Fax: 203-432-6144 |
 
Received on Thu May 22 1997 - 00:00:00 CEST

Original text of this message