Re: Why does a hard parse access data in the table in the query?

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Sat, 16 Feb 2019 21:14:46 -0500
Message-ID: <37e6dcc6-a182-6774-d0d1-11c3f58925f2_at_gmail.com>



Hi Mark!

Well, that is a deeply philosophical question. The data in the GTT usually has very short duration, either until transaction commits or until the session ends. Any durable statistics may be of very questionable validity because of the frequent data changes. The only case in which statistics on a GTT MAY help is if the data in the GTT always follows the same pattern. Personally, I do prefer dynamic sampling for GTT's over permanent statistics collected using DBMS_STATS.

Regards

On 2/8/19 1:25 PM, Powell, Mark wrote:
>
> If statistics exist on the GTT I do not think dynamic sampling is
> invoked.  I find the best way to deal with GTT's is to load them with
> representative data in a session, generate statistics, and lock the
> statistics.
>
> Mark Powell
> Database Administration
> (313) 592-5148
>

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217


--
http://www.freelists.org/webpage/oracle-l
Received on Sun Feb 17 2019 - 03:14:46 CET

Original text of this message