Data dictionary Cache - dc_objects [message #514426] |
Mon, 04 July 2011 12:55 |
|
Rags123
Messages: 39 Registered: July 2011 Location: United Kingdom
|
Member |
|
|
Hi,
In order to improve the performance of our live server, I am trying to do an exhaustive comparison with our test envrioment which is quite quick in spite of the fact that we port the data from Live every month.
There are no obviously slow queries appearing in the the top SQLs of AWR, we have optimised such things already. Right now it is about general uplift rather than SQL based tuning.
I picked up random SQLs and I noticed a marked differences in the execution time. Typically they are 3 to 4 times and there are cases much more than that.
1. I observed that, while the explain plan of the queries are same, trace of the queries give a different picture. I have observed that the recursive calls, consistent gets and sorts(memory) are quite high on Live.
2. I have no solid reasons to say this but my instincts tell me that the recursive calls is the major contributing factor. It is sometimes 2000+ for an SQL.
3. On googling more on that, it finally made me compare the data dictionary on the AWR report of test and Live.
The dc_objects caught my eyes. In that 4 hour AWR, there were about 10 million get requests and the pct miss was ~10. For similar load, the test server had 5 million gets with 0.08 PCT miss for 4 hours.
Have I really caught atleast one of the spoilers? If yes, what is next?
|
|
|
|
Re: Data dictionary Cache - dc_objects [message #514429 is a reply to message #514427] |
Mon, 04 July 2011 13:11 |
|
Rags123
Messages: 39 Registered: July 2011 Location: United Kingdom
|
Member |
|
|
The whole intent of having that particular test server is to test non-functionals. We keep deploying all the code to this instance to ensure that the changes have not had a big impact on the performance.
As far as data, we keep importing the data from production so that the volumes are similar. Everytime we import, we delete the schema, recreate it and re-import it from production.
The similar load is created by a simulation mechanisim. We make the instance deal with various operations (quantity and mixture) which is typically dealt by the production server
[Updated on: Mon, 04 July 2011 13:16] Report message to a moderator
|
|
|
|
|
|
Re: Data dictionary Cache - dc_objects [message #514488 is a reply to message #514436] |
Tue, 05 July 2011 02:57 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
I'll have a go at this.
Looking at those trace results you posted (and, by the way, it would be much better to have the results of the tkprof output, formatted correctly with code tags) it seems unlikely that the execution plans for the statements are the same, because of the sort figures. I would check that first.
Can you post the AWR reports?
I wouldn't worry about your recursive call or db_object figures: they are to do with parsing rather than execution.
|
|
|
Re: Data dictionary Cache - dc_objects [message #514538 is a reply to message #514488] |
Tue, 05 July 2011 05:52 |
|
Rags123
Messages: 39 Registered: July 2011 Location: United Kingdom
|
Member |
|
|
Hi John,
Thanks. I have attached the AWR in PDF format. Please note that the SQL that I used is a random one and does not appear in the AWR. Infact AWR SQL section is able to account for just 40-50% of total DB time.
The TKPROF for that SQL, I will get it sometime in the evening.
[Attachment was removed on request. We have found a SQL table structure of one of our applications that has been uploaded to your forums and we'd like to request it to be taken down.]
[Updated on: Thu, 27 February 2020 14:07] by Moderator Report message to a moderator
|
|
|
Re: Data dictionary Cache - dc_objects [message #514578 is a reply to message #514538] |
Tue, 05 July 2011 08:10 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
How can you compare performance between two different databases if you don't have the trace and the AWR report from each database? And why investigate a SQL that doesn't appear as a high-load statement in the AWR report?
[update:
incidentally, the report in PDF format is much harder to use than the original HTML format, because in the conversion you lose all the links for navigating within it. Also, a report covering such a laong time is not always as useful as reports over a more focussed period]
[Updated on: Tue, 05 July 2011 08:14] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Data dictionary Cache - dc_objects [message #516056 is a reply to message #516047] |
Thu, 14 July 2011 16:28 |
|
LNossov
Messages: 318 Registered: July 2011 Location: Germany
|
Senior Member |
|
|
Perhaps the shared pool on your test db is oversized. And you didn't reboot this db for a long time. More interesting is the output from you productive db. I expected more child cursors because of cursor_sharing=similar and a lot of hard parse calls. Could you please run this sql:
select *
from (select force_matching_signature,count(*)
from v$sql
where force_matching_signature != 0
group by force_matching_signature order by 2 desc)
where rownum <= 20;
[Updated on: Fri, 15 July 2011 01:47] by Moderator Report message to a moderator
|
|
|
|
|
Re: Data dictionary Cache - dc_objects [message #516262 is a reply to message #516218] |
Fri, 15 July 2011 14:46 |
|
LNossov
Messages: 318 Registered: July 2011 Location: Germany
|
Senior Member |
|
|
May be cursor_sharing=similar isn't a main reason for a big number of hard parse calls on your system. In this case we should have seen a lot of child cursors. But it isn't a case for the most sql's (s. your first output).
So I supposed then, there are some sql's with literals, that cause a hard parsing. May be some sessions use cursor_sharing=exact or these sql's are recursive, I thought. This was a reason, why I asked you to upload the second output. But I could not find a lot of cursors with the same signature in this output. It means, there are a lot of sql's with totally different sqltexts. May be some of them will be generated in your programm. Can you confirm this? In this case it doesn't matter, if these sql's involve literals or bind variables. Oracle has to make a hard parse call, because the sqltext differs from others. Perhaps cursor_sharing = similar makes this situation worse.
It is difficult to say, whether you definitely get improvement with cursor_sharing=force or not, because the child cursor lists are relatively short and we didn't investigate yet, if cursor_sharing=similar is a reason for not sharing the cursors. We would have to check v$sql_shared_cursor for that for some sql_id's.
You asked about oversizing of the shared pool in your test system. I think so, because there are lot of child cursors there (in contrast to your productive system). I suppose, the load in the shared pool is not so big as in the productive system. The size of shared pool allows the cursors to stay there for a long time without flushing out.
[Updated on: Sat, 16 July 2011 00:38] Report message to a moderator
|
|
|
|