Some days ago i came across with a pl/sql code where they used (for some reason) an Oracle hint called SYS_DL_CURSOR. I got it when i…
View More Oracle CBO is ignoring SYS_DL_CURSORCategory: performance
APPEND_VALUES and SYS_DL_CURSOR Hints with HCC
The APPEND_VALUES hint was introduced in 11.2 to allow direct path inserts with variables using the VALUES clause. i.e. INSERT INTO XYZ (COL1, COL2) VALUES…
View More APPEND_VALUES and SYS_DL_CURSOR Hints with HCCPostgreSQL “bind variable peeking”
custom vs. generic plans With my Oracle database background, I know how important it is to balance the pros and cons of using bind variables…
View More PostgreSQL “bind variable peeking”Postgresql PREPARE — prepare a statement for execution
Synopsis PREPARE name [ ( data_type [, …] ) ] AS statement Description PREPARE creates a prepared statement. A prepared statement is a server-side object that…
View More Postgresql PREPARE — prepare a statement for executionAdaptive Cursor Sharing in Oracle Database 11g Release 1
DBAs are always encouraging developers to use bind variables, but when bind variables are used against columns containing skewed data they sometimes lead to less…
View More Adaptive Cursor Sharing in Oracle Database 11g Release 1How to Swap SQL_Profiles?
The central idea behind “swapping” SQL profiles is simple. You define a SQL profile that specifies the SQL statement that you want to tune, and an…
View More How to Swap SQL_Profiles?SQL Profiles in the Data Dictionary
In the paper SQL Profiles (page 22) I described the data dictionary tables where the hints belonging to SQL profiles are stored. For example, with the following…
View More SQL Profiles in the Data DictionaryUseful Gather Statistics Commands In Oracle
This article contains all the useful gather statistics related commands. 1. Gather dictionary stats: — It gathers statistics for dictionary schemas ‘SYS’, ‘SYSTEM’ and other…
View More Useful Gather Statistics Commands In OracleCURSOR_SHARING=SIMILAR AND FORCE – SOME EXAMPLES
The CURSOR_SHARING parameter basically influences the extent to which SQL statements (or cursors) can be shared. The possible values are EXACT which is the default…
View More CURSOR_SHARING=SIMILAR AND FORCE – SOME EXAMPLES12c: Optimizer_Dynamic_Sampling = 11
With default sampling level of 2 (from 10g onwards) , dynamic sampling is performed only for the objects for which statistics do not exist. If…
View More 12c: Optimizer_Dynamic_Sampling = 11