Library cache locks: a case study
Recently I was asked to help with a case involving library cache locks, and even though it was really simple, I think it’s good for illustrating a few points in performance analysis. As it often...
View ArticleHistograms for strongly skewed columns
On a recent OTN thread, I learned a nice trick by J. Lewis that allows to circumvent certain problems with histograms. Histograms were designed to solve the problem of estimating cardinality for skewed...
View ArticleTroubleshooting log file sync waits — a simple case study
Yesterday I was asked to give my opinion on the AWR below: DB Name DB Id Instance Inst num Release RAC Host ***** ***** ***** 1 10.2.0.4.0 NO ****** Snap Id Snap Time Sessions Cursors/Session Begin...
View ArticleAWR report case study: stating the obvious
It’s been a while since I came across an interesting and complex case. However, yesterday on an OTN forum thread I saw a case which was interesting by its simplicity. Even though it’s almost trivial on...
View ArticleAWR report: load profile
Introduction “Load profile” section of the AWR report contains some extremely useful information, and yet it is very often overlooked (often in favor of instance efficiency percentages, which is easier...
View ArticleA map to AWR report
Introduction An average 11g AWR report spans 40 screens broken into approximately 50 sections. That’s a lot, especially for someone who’s not very well familiar with AWR reports, so I decided to make...
View ArticleCPU starvation disguised as an I/O issue (yet another AWR case study)
In AWR analysis, what appears to be the root cause of the issue, can easily turn out to be just a symptom. Last week, Rajat sent me an AWR report which is a perfect illustration of this (thanks Rajat),...
View ArticleEfficiency-based SQL tuning
Introduction In order to tune a query, you need to know two things: - can it be tuned, and if yes, then by how much - which part of the query (which operation, or which data object) is most promising...
View ArticleTuning Analytic Functions
In general, tuning analytic functions (and more generally, all sort operations) is rather difficult. While for most poorly performing queries it’s relatively straightforward to gain some improvements...
View ArticleGlobal Hints
Occasionally I encounter a situation when I need to affect a part of the plan that corresponds to a view, e.g.: select * from ( select v.x, x.y from v ) q where q.x = 1 Such situations are resolved...
View ArticleRead consistency overhead
SQL performance can degrade for many reasons, some of most common are: - plan changes - data skewness - low caching efficiency - data growth - contention. All these factors are relatively well known. A...
View ArticleQuerying trace files
SQL trace file provide the highest level of detail possible about SQL execution. The problem with that information is converting it to a convenient format for further analysis. One very good solution...
View ArticlePiggyback commits
Not every commit results in a redo write. This is because there are multiple optimizations (some controlled by the user e.g. with COMMIT_LOGGING parameter, some automatic) that aim at reducing the...
View ArticleCPU-starved LGWR
In my recent post I showed how log file sync (LFS) and log file parallel write (LFPW) look for normal systems. I think it would also be interesting to compare that to the situation when LGWR does not...
View ArticleLies, damned lies and non production-like performance testing
Chasing cost efficiency, business often cuts back on money spent on UAT boxes used for performance testing. More often than not, this is a bad-decision, because the only thing worse than not having a...
View ArticleLog buffer space
Introduction Log buffer space is a simple, yet frequently misunderstood wait event. The main reason for that is probably its name. It sounds as if it points immediately to the answer: if space in the...
View ArticleNested loop internals
Nested loop join appears like the simplest thing there could be — you go through one table, and as you go, per each row found you probe the second table to see if you find any matching rows. But thanks...
View ArticleQuery tuning by waste minimization: a real-life example
Today I’d like to share another tuning example from a recent case at work, which in my opinion is good for illustrating typical steps involved in SQL optimization process. I was handed a poorly...
View ArticleBusiness rules, common sense and query performance
Very often, significant performance benefits can be obtained by using some very basic knowledge of the application, its data and business rules. Sometimes even less than that: even if you are not...
View Article