Newsgroups: comp.databases.oracle.server
From: Charles Hooper <hooperc2...@yahoo.com>
Date: Mon, 28 Jan 2008 08:39:13 -0800 (PST)
Local: Mon, Jan 28 2008 11:39 am
Subject: Re: long running select min(timestamp) query
On Jan 28, 10:40 am, "bobdu...@gmail.com" <bobdu...@gmail.com> wrote:
> Hi, Try a simple test: > I have a basic event table in my 10g database, primary integer key, > select min(eventdate) from events; > It can occasionally take a VERY long time. There is a standard btree > In my current scenario, the table has less than a million records, and > Operation Object Object Type Order Rows Size (KB) Cost Time (sec) CPU > I've run the ADDM, it updated the stats, but that doesn't seem to help > Thanks, First, create a table with a single column and an index on that column: CREATE TABLE T1 (EVENTDATE TIMESTAMP NOT NULL); CREATE INDEX T1_IND1 ON T1(EVENTDATE); Now, insert 900,000 rows into the table, commit and gather table and COMMIT; EXEC Finally, run a simple query: From a 10046 trace, only 3 blocks read, all by consistent read: The DBMS XPLAN: Does the above experiment execute quickly, and read only 3 blocks on Charles Hooper You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||