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

Home -> Community -> Usenet -> comp.databases.theory -> Re: replace subquery with left join

Re: replace subquery with left join

From: Alexander Kuznetsov <Alexander.Kuznetsov_at_marshmc.com>
Date: 7 Nov 2002 20:27:37 -0800
Message-ID: <ac5bc7c1.0211072027.688bf69@posting.google.com>


Hi Hans,
I handled a very similar performance problem some years ago. In my particular case the table was updated infrequently but very havily selected from.
I added a column VALID_TO, it would be NULL for the latest record. Created 2 indexes (VALID_FROM, VALID_TO) and (VALID_TO, VALID_FROM) In DB2, make sure both indexes ALLOW REVERSE SCANS and keep stats fresh

covered by an index, queries like (VALID_FROM <= SOME_DATE) AND (SOME_DATE < VALID_TO)
started running very very fast

good lick Received on Thu Nov 07 2002 - 22:27:37 CST

Original text of this message

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