Re: long running select min(timestamp) query

From: Robert Klemme <shortcutter_at_googlemail.com>
Date: Wed, 30 Jan 2008 02:02:11 -0800 (PST)
Message-ID: <65910543-91a0-47e0-a9f1-c38a6dbcdbd5@k2g2000hse.googlegroups.com>


On Jan 29, 10:36 pm, "bobdu..._at_gmail.com" <bobdu..._at_gmail.com> wrote:
> I definitely have done some large scale deletes. When i say
> occasionally, there have been times when the query has been fast, but
> it hasn't been fast in a long time... likely since the last large
> scale delete operation actually.

I doubt it makes a difference for the min/max types of queries but do you update statistics on a regular basis, or at least after such mass deletes? There *may* be an impact if concurrently running queries are less efficient because of stale statistics and your IO becomes slower just because of increased concurrent IO load.

> I just tried to get more stats via the following call, and then
> checked again for chained rows (not sure if it would've affected, but
> tried anyways):
>
> SQL> exec
> DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=>USER,TABNAME=>'EVENTS,CASCADE=>TRUE);
Maybe you can even update the whole schema's statistics if you haven't done in a time or on a regular basis.

Do you have system statistics set?

Kind regards Received on Wed Jan 30 2008 - 04:02:11 CST

Original text of this message