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

Home -> Community -> Usenet -> c.d.o.misc -> Optimizing max function

Optimizing max function

From: Mark Wagoner <mwagoner_at_no.spam.iac.net>
Date: Tue, 20 Jul 1999 12:55:24 GMT
Message-ID: <379470d9.139601346@news.iac.net>


I have a stored procedure that needs to determine the max value of a column at insert time. I have tried creating an non-unique index on this column (and using a hint to force the optimizer to use it) but this only results in a full index scan. With over 500,000 rows in the table, this results in 2 sec response time. I need to tweek this to under 1 sec.

Is there some way to optimize a query containing the max() function?

Thanks.

--
Mark Wagoner
To reply, remove no.spam from my e-mail address Received on Tue Jul 20 1999 - 07:55:24 CDT

Original text of this message

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