03 February 2017
03 February 2017

Understanding SQL Query Parsing: Part 4 – Understanding Bind Variable Peeking

0
7
In the 3rd part of this series, I introduced you to the concept of the bind variables. We also learned their importance in regard to cursors, i.e. how with the presence of bind variables, cursor reparsing can be reduced significantly. But as is famously said in the world of performance tuning, there is nothing black or white: it’s all grey… Read more
02 February 2017
02 February 2017

Oracle for Absolute Beginners: Date, Timestamp and Interval

0
42
All databases stand on a tripod of datatypes: strings, numbers and dates. And though they might dress them in fancy clothing – varchar2, clob, float, integer – strings are really just strings, and numbers are really just numbers. But dates — dates are interesting. In this article I’ll talk to you about dates, about time, and about how both ar… Read more
25 January 2017
25 January 2017

Duplicate Point-In-Time Recovered PDB Using Backup

0
3
At times, we might need to duplicate a production pluggable database to a Past Point in Time without disturbing the production database itself, in order to: View the data in the Production Database (PDB) as it appeared then Perform testing Generate reports, etc. Duplication of a PDB slightly differs from that of a non-CDB. In order to duplicate the PDB, an… Read more
24 January 2017
24 January 2017

Snapshots

0
4
While looking at the results from a query against the dynamic performance view v$active_session_history during a recent trouble-shooting assignment I noticed a result that was so unusual that I decided I needed to get some information from the v$ash_info view over an interval of about 3 minutes – and it didn’t matter which three minutes in particular, any three (consecutive)… Read more
24 January 2017
24 January 2017

Index Costing Threat

0
2
In the previous post I described a problem with the strategy that the optimizer uses for costing an index fast full scan, and the alternative strategy that Oracle had supplied at some point in the 10g timeline to allow a more rational cost to be calculated in special cases. In an earlier post still I had described the problem wit… Read more
20 January 2017
20 January 2017

Understanding SQL Query Parsing – Part 3: Bind Variables and Cursor Sharing

In the first and the second parts of this series, we learned what query parsing is, how hard and soft parsing work, what their impact on the query is, and then moved on to understand the concept of parent and child cursors. In this third article, we will look at the issue of duplicate SQL statements and how Bind Variables… Read more
20 January 2017
20 January 2017

Problems with Indexes

0
2
In my book “Cost Based Oracle – Fundamentals” (Apress 2005) I described a problem with the cost calculation for the index fast full scan: When you generate statistics for a table, one of the results is the number of blocks below the high water mark. When you generate the statistics for an index, you get the number of leaf blocks… Read more
09 January 2017
09 January 2017

Oracle Data Type Implicit Conversion Hierarchy

0
1
In Oracle, under certain circumstances, an implicit data type conversion precludes the use of indexes. Perhaps you have a vague idea of what an implicit data type conversion hierarchy is, and you might even ignore the subtlety of the implicit data type conversion direction within a query predicate expression. Hopefully this article will shed some light on this concept. 1… Read more
09 January 2017
09 January 2017

Investigating Indexes – 2

0
1
In an earlier article on investigating indexes I described some methods for looking at the internal structure of an index to get an idea of its current state of health. Although this type of knowledge helps you to make informed decisions about which indexes might need special treatment (like being permanently dropped, perhaps) it doesn’t immediately answer questions like: “what’s… Read more
12 December 2016
12 December 2016

Invisible Columns In Oracle Database 12C

0
17
In Oracle Database 12c, you can set a column in table as invisible either during CREATE TABLE or modifying existing table via ALTER TABLE command. By default, table columns are always visible. When you make it invisible, the COL# column in COL$ dictionary is updated to 0, and so is not included in the “SELECT *” or “INSERT INTO VALUES”… Read more
08 December 2016
08 December 2016

Unpivot

0
0
One of the sessions at the recent annual UKOUG technical conference (Tech16) was a panel session on optimisation for which I had posted a request for a few advance questions, and one of the questions that appeared in my inbox was as follows: I have a report which is a union all of 27 versions of the statement: select ‘ColumnX_name’… Read more
30 November 2016
30 November 2016

Re-registering Databases In A Cluster With srvctl: Problems and Solutions

0
4
Recently I wanted to create a policy managed database in my 12.1.0.2 flex cluster setup, but free servers are not available. Hence I had to unregister an administrator managed RAC database (amdbh12) to make the servers available. Having completed my testing, I dropped the policy managed database and then wanted to drop the database amdbh12 using DBCA… Read more
07 October 2016
07 October 2016

Explore Oracle Database In-Memory – Part 2

0
1
Oracle In-Memory is fully compatible with Oracle multitenant database architecture, allowing us to take advantage of fast In-Memory and low-cost storage. This multitenant architecture was also introduced in Oracle 12c, featuring multiple pluggable databases (PDBs) within a container database (CDB). This makes it easy to consolidate databases onto the cloud, deliver a high density of schema-based consolidation without making changes… … Read more
03 October 2016
03 October 2016

Hacking Indexes

0
0
Indexes are expensive to maintain so we want to get the greatest benefit we can from them and make sure that Oracle uses them whenever it’s appropriate. Sometimes, though, the optimizer seems to ignore indexes that we think would be very effective and when this happens it’s often because the statistics that Oracle has gathered do not reflect the quality… Read more
29 September 2016
29 September 2016

Migrate Oracle Database To ASM Using ASMCMD

0
3
Introduction Oracle Database 10g Release 1 introduced Automatic Storage Management (ASM), a new framework for managing Oracle database files. ASM provides a foundation for highly efficient storage management with direct I/O, redundancy, striping and load balancing. Files stored on ASM are evenly distributed across disks in a disk group and mirrored according to the policies defined in the disk grou… Read more
28 September 2016
28 September 2016

Investigating Indexes

0
0
Rebuilding indexes is an activity that you shouldn’t need to do often. There are always a few special cases – like when you’ve moved or recreated a table or if you’ve done a massive delete on a table – when it’s probably a reasonable idea but, in general, there are very few cases where there’s any great benefit to b… Read more