IOT Hash
It’s another of my double-entendre titles. The optimizer can turn a hash join involving an index-organized table into a real performance disaster (though you may have to help it along the way by using...
View ArticleE-rows / A-rows
This note was prompted by an error I made at the UKOUG TechFest19 yesterday. It’s fairly well-known that when you read an execution plan that includes the rowsource execution stats– so you get the...
View ArticleTemp space
A question about hunting down the source of the error “ORA-01652 unable to extend temp segment by NNN in tablespace XXX” shows up on the Oracle-L mailing list or the Oracle developer community forum...
View ArticleScalar Subq Bug
This is an observation that came up on the Oracle Developer Forum a couple of days ago, starting life as the fairly common problem:I have a “select” that runs quickly but when I use in a “create as...
View Articlepush_having_to_gby()
I came across an interesting new hint recently when checking the Outline Data for an execution plan: /*+ push_having_to_gby() */ It’s an example of a “small” change designed to reduce CPU usage by...
View Articlepush_having_to_gby() – 2
THe problem with finding something new and fiddling with it and checking to see how you can best use it to advantage is that you sometimes manage to “break” it very quickly. In yesterday’s blog note I...
View ArticleCollection limitation
The ODC SQL and PL/SQL forum came up with an example a couple of days ago that highlighted an annoying limitation in the optimizer’s handling of table functions. The requirement was for a piece of SQL...
View ArticleCollections
This is a note I drafted in September 2015 and only rediscovered a couple of days ago while searching for something I was sure I’d written about collections and/or table functions. The intention of...
View ArticleSSQ Unnesting
I hesitate to call something a bug simply because Oracle doesn’t do what I thought it would do; but when a trace file says:“I’m not going to do X because P is not true“followed a little later by“I’m...
View ArticleJoin Elimination bug
It is possible to take subquery factoring (common table expressions / CTEs) too far. The most important purpose of factoring is to make a complex query easier to understand – especially if you can...
View ArticleFake Baselines – 2
Many years ago (2011) I wrote a note describing how you could attach the Outline Information from one query to the SQL_ID of another query using the official Oracle mechanism of calling...
View Articlecount(*) – again
I’ve just received an email asking (yet again) a question about counting the number of rows in a table.We have a large table with a CLOB column, where the CLOB occupies 85% storage space.when we use...
View Articledense_rank
I’ve just been prompted to complete and publish a draft I started a few years ago. It’s (ultimately) about a feature that appeared in 9i but doesn’t seem to show up very often at client sites or as a...
View ArticleANSI hinting
I’ve made casual remarks in the past about how “ANSI”-style SQL introduces extra complications in labelling or identifying query blocks – which means it’s harder to hint correctly. This is a note to...
View ArticleExecution Plans
One of the most important skills needed when investigating badly performing SQL is the ability to read Execution Plans. It’s a topic I’ve written and spoken about frequently – even to the extent of...
View ArticleEureka!
I woke up last night with a brilliant solution to a problem that’s been bugging me for more than a year. How does a call to report_sql_monitor() manage to produce output like this:read more
View Articledate_to_date
Every now and again someone posts a piece of SQL on the Oracle Developer Forum that includes a predicate with an expression like to_date(date_column). This is a problem for several reasons – not the...
View ArticleExecution Plans
In a recent blog note I made the point that there is a very simple rule (“first child first”) for reading execution plans if the query (as written or after transformation by the optimizer) consists of...
View ArticleExecution Plans
A couple of days ago I discussed an execution plan that displayed some variation in the way it handled subqueries and even threw in a little deception by displaying an anti-join that was the result of...
View ArticleHint hacking
How do you work out what hints you need to tweak an execution plan into the shape you want?Here’s a “case study” that’s been playing out over a few weeks on the Oracle Developer Community (hereand...
View Article