Cardinality of table collection expression
Table collection expression has been in Oracle for more than 10 years. It is handy for passing an array to Oracle. Quite often, though, there is was a well-known problem with a default cardinality...
View ArticleEnhanced Subquery Optimizations in Oracle
While googling I found a fresh article from Oracle for the VLDB journal: Enhanced Subquery Optimization in Oracle. It primarily discusses subqueries – how Oracle deals with them on optimization and at...
View ArticleCONNECT BY oddity
This week I’ve seen an issue with a CONNECT BY query: for some reason Oracle 10.2.0.4 decided to build a weird plan (the query is weird too, but that’s not my point here ). An explanation of why that...
View ArticleNL join (ordered)
Some time ago there was a thread on the SQL.ru forum where user has asked the never-ending question “why CBO is doing this?”. The problem was a simple count(*) of parent-child tables join with no FK...
View ArticleExtended statistics and function-based indexes
About a year ago I’ve discovered nice feature of Oracle 10gR2 CBO: to overcome an issue with calculated selectivity for predicates on multiple columns, it can use DISTINCT_KEYS of the available index....
View ArticleHow to kill performance with 16MB table
If you think 16MB tables are so small that can’t be root cause of significant performance problems with SELECT queries, then read about my today’s headache – a story of 16MB table worth something like...
View Article_connect_by_use_union_all
This is just a short note on the parameter introduced in the 11gR2 called _connect_by_use_union_all. I’ve noticed it for the first time in Doc ID 7210630.8, which gives a brief overview of the changes...
View ArticleEnabling constraint in parallel
Recently I did some tuning of data generation scripts, which purpose is to build large amount of representative data for application testing. Direct-path inserts are in use and as a prerequisite all...
View ArticleDistinct placement
As a follow-up to a recent post on different names Oracle can use for the intermediate views, here is a quick example of the technique called distinct placement. drop table t1 cascade constraints...
View ArticleORDER BY
This is a quick note on the importance of ORDER BY for the order of the result set produced by a SELECT. The mantra is very simple: Without an order_by_clause, no guarantee exists that the same query...
View ArticleScalar subquery unnesting
Here is a nice example of what Oracle 11.2.0.2 is able to do with a subquery inside an expression. It can unnest it – that is a new 11.2.0.2 feature of the transformation part of the CBO. Let’s see...
View ArticleCBO isn’t perfect
And you should remember that. Here is a nice example how Cost Based Optimizer can miss an obvious option (which is available to human eye and Oracle run-time with a hint) while searching for the best...
View ArticleFBI trouble
In our application we extensively use a function-based index on an important table. Couple of days ago I’ve seen an interesting issue associated with this FBI, view and a GROUP BY query. I have to say...
View ArticleUnnesting disjunctive subqueries (with OR predicate)
Jonathan Lewis has recently posted a good example of CBO not good enough in transforming specific query types. A recent thread on the SQL.ru Oracle forum reminded me of this issue. Basically OP has a...
View ArticleConsultancy
I have a permanent job at the NetCracker‘s System Performance group. Recently I was offered to do one day job outside, on-site in another company, which coincidentally has an office close to...
View ArticleOIC(A) again
Issues with OICA/OIC (OPTIMIZER_INDEX_COST_ADJ/OPTIMIZER_INDEX_CACHING) parameters have already been mentioned many times. Recently I’ve noticed one more and I think I didn’t see this case somewhere...
View ArticleIgnoring hints
A hint is an instruction to the optimizer This is what’s written in Oracle documentation. Instruction is defined as a code that tells a computer to perform a particular operation Which means Oracle CBO...
View ArticleSystem statistics poll
Recent thread in the OakTable mailing list prompted me to create a poll and ask about the ways DBAs use system statistics in real systems. If you struggle to understand what system statistics is and...
View ArticleOIC(A) again – 2
Continuing from the previous post, here is one more case when adjusting optimizer_index_cost_adj may hurt you. Setup: drop table t1 cascade constraints purge; create table t1 (id, x, pad, constraint...
View ArticleLong Parsing and PGA limits
Recently I’ve seen not so smart optimizer behavior: one query took long time to parse, and ended with an error hitting PGA_AGGREGATE_LIMIT in few minutes; another query was just parsed for ages while...
View Article
More Pages to Explore .....