Chris Antognini's picture

Extension Bypassed Because of Missing Histogram

Today, while tuning a fairly complex query experiencing wrong cardinality estimates, I noticed something I was not aware of. Hence, I thought to write this short post to illustrate how to reproduce the problem I experienced…

marco's picture

ORA-14696: MAX_STRING_SIZE migration is incomplete for pluggable database

Like me, in the future or for testing, you might need a database with varchar2(32k) support. Although most is explained, the current documentation is a...
class="readmore">Read More

marco's picture

String Aggregation of “Huge” Strings via XML

My goal was initially to concatenate all rows generated via the package DBMS_FEATURE_USAGE_REPORT in one big HTML (XML?) document instead of the by default generated...
class="readmore">Read More

Chris Antognini's picture

Adaptive Plans in Active Session History

Yesterday, during the talk “The Query Optimizer in Oracle Database 12c – What’s New?” at OakTable World UK 2013, an attendee asked me an interesting question that can be summarized as follows: does ASH show the switch of execution plan that takes place for an adaptive plan?

Since I didn’t know the answer, here are some tests I did to find out how it works.

First of all, it’s important to recognize that the plan hash value related to an adaptive plan changes depending on which subplan is activated. Let’s take as example the following query (notice that the execution plan is adaptive and that the hash value of the default plan is 1837274416):

marco's picture

Oracle XMLDB Pragma – Cheat sheet

Hereby a listing of XQuery, XPath pragma’s used in the Oracle (XMLDB) environment. The list is currently not ordered, and/or order by topic; this so...
class="readmore">Read More

randolf.geist's picture

New Version Of XPLAN_ASH Utility

A new version of the XPLAN_ASH tool (detailed analysis of a single SQL statement execution) is available for download. The previous post includes links to video tutorials explaining what the tool is about.

As usual the latest version can be downloaded here.

The new version comes with numerous improvements and new features. The most important ones are:

  • Real-Time SQL Monitoring info included
  • Complete coverage including recursive SQL
  • Improved performance
  • 12c compatible
  • Simplified usage
randolf.geist's picture

View Data Volume Estimates

When the optimizer has to estimate the data volume (the BYTES column in the plan output), it usually bases this information on the column statistics, if applicable and available (think of complex expressions).However, whenever there is a VIEW operator in an execution plan, that represents an unmerged view, the optimizer obviously "loses" this information and starts applying defaults that are based on the column definition.Depending on the actual content of the columns this can lead to dramatic differences in data volume estimates.Both, under- and overestimates are possible, because for character based columns these defaults seem to be based on an assumed 50% fill grade, so a VARCHAR2(100 BYTE) column counts as 50 bytes data volume.For multi-byte character sets the same rule applies based on the maximum width of a column using the "char" semantics, so a VARCHAR2(1000 CHAR) column counts as 2000 byte

Chris Antognini's picture

System Statistics Gathered in Exadata Mode – When Are They Relevant?

The aim of this post isn’t to explain what the “exadata mode” is. Hence, if you don’t know what it is, before continuing reading have a look to this post published on Kerry Osborne’s blog. The only thing I would like to add is that the “exadata mode” is available as of or when a patch implementing the enhancement associated to bug 10248538 is installed.

The key information I would like to share with you is that, in some situations, gathering system statistics in “exadata mode” is pointless. Let me explain why… But, before doing so, it’s important to review how the query optimizer computes the cost of full scans.

The key formula used by the query optimizer to compute the I/O cost of a full scan is the following:

io_cost = ceil ( blocks / mbrc * mreadtim / sreadtim ) + 1


marco's picture

Technology preview – Oracle XQuery for Hadoop (New Big Data Connector)

Yesterday I went to the Big Data machine engineered systems demo grounds, to get an insight, exclusive demo from Dmitry Lychagin. Dmitry, being part of...
class="readmore">Read More

marco's picture

Oracle OpenWorld: JSON Support in the Oracle 12c Database (upcoming new feature)

Currently I am attending the “Schema less data management using SQL/JSON” session during Oracle OpenWorld. This session demonstrated the new upcoming feature (=not in the current release) in the 12c database which supports JSON data handling in the database. That is, of course, with the nowadays common disclaimer, it probably will, but is not guaranteed


Syndicate content