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

Home -> Community -> Usenet -> c.d.o.server -> Re: Resetting highwatermark

Re: Resetting highwatermark

From: Chrysalis <cellis_at_iol.ie>
Date: 1997/09/20
Message-ID: <342398EB.598A@iol.ie>#1/1

Brian Rasmusson wrote:
>
> Hi,
>
> is it possible to reset the highwatermark of a table? I cannot drop
> or truncate the table as it is in use constantly.
>
> What i have is a transaction table, where one process writes, and
> one reads and deletes.
>
> I only process a limited number of transactions at a time, and i find
> a range by selecting min and max ids of the rows. Problem
> is if the read/delete process has been down for a period, lots of
> transactions will be written to the table, thus setting the highwater
> mark.
>
> Now, if there have been, say, 800.000 transactions in the table, but
> there
> normally is only around 5000, the selection of min and max will be very
> slow. Is there any way to get around this?
>
> Best regards,
> Brian
>
> --
> ------------------------------------------------------------------------
> Brian Rasmusson, Software engineer & analyst e-mail: brianr_at_belle.dk
> Belle Systems A/S web : www.belle.dk
> Network, Internet and communication specialists phone : +45 59442500
> ------------------------------------------------------------------------
Assuming that the column you are referencing is indexed, the optimizer will use it to select min(column) OR max(column), but not both in the same statement!

You may find it useful to issue two separate selects, one for the min() and one for the max()

HTH

-- 
Chrysalis

FABRICATI DIEM, PVNC
('To Protect and to Serve')
Terry Pratchett : "Guards Guards"
Received on Sat Sep 20 1997 - 00:00:00 CDT

Original text of this message

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