RE: Slow SQL performance

From: Elliott, Patrick <>
Date: Mon, 21 Apr 2008 14:01:12 -0500
Message-ID: <>

When you ran this query on the test system, did you run it with a full production load on the system? I would think that the problem is not missing histograms, but missing indexes. Histograms will help you to use indexes or partitions that are not being used. If you want to force a hard parse of the query, then you just issue an 'alter system flush shared_pool', but I don't think it is going to help.


-----Original Message-----

From: [] On Behalf Of Maureen English Sent: Monday, April 21, 2008 1:13 PM
Subject: Slow SQL performance


We are having a performance problem with our production server that is not occurring on our test server (a copy of the production server).

Both instances are 10g ( on HP Tru64 hardware.

The known difference between the two instances is that when the test system was upgraded, I generated statistics on the table using the 'FOR ALL COLUMNS' clause in dbms_gather_table_stats. In the production system, I couldn't afford the time it took to gather statistics for all columns, so I used the 'FOR ALL INDEXED COLUMNS' clause.

The main table in our slow query happens to not have any indexes on it. I've since generated stats on that table, but it seems to have made no difference.

I'm thinking that since the query is used constantly, it is still in memory, and will stay that way until something forces it out....

Since the query is constantly used, is there a way that I can clear it from the cache? I'm looking into the DBMS_SHARED_POOL package's UNKEEP procedure, but the description of the KEEP procedure makes it sound like this will not work for tables.

Any suggestions?

[CONFIDENTIALITY AND PRIVACY NOTICE] Information transmitted by this email is proprietary to Medtronic and is intended for use only by the individual or entity to which it is addressed, and may contain information that is private, privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please delete this mail from your records.  

To view this notice in other languages you can either select the following link or manually copy and paste the link into the address bar of a web browser:
-- Received on Mon Apr 21 2008 - 14:01:12 CDT

Original text of this message