Tips

Fast SPLIT PARTITION operation is unusually slow

I recently observed that the total time taken to split an empty partition, in 10.2.0.5, has increased by many fold—i.e. from under 30 seconds to 60 minutes. SPLIT PARTITION operation is, simply, creating two new partitions and redistributing the rows from the partition being split into the two new partitions. Often one new partition contains …

Fast SPLIT PARTITION operation is unusually slow Read More »

Computing Oracle SQL_ID and HASH_VALUE

I needed an hash function, in Java, which is simple, practically less collision and provides a short alphanumeric or an unsigned number as hash for any string or text. I stumbled upon few blog posts that explain how Oracle SQL_ID and HASH_VALUE are calculated by database engine, concisely and elaborately; also implementations in Python and …

Computing Oracle SQL_ID and HASH_VALUE Read More »

RECORD feature of TKPROF

This is just a short note the point out that RECORD option of TKPROF is extremely useful in recording and capturing the non-recursive SQL statements in the order of execution from the SQL trace file.  I have not had a requirement to use it until—today—one of my developers lost the original test script used when …

RECORD feature of TKPROF Read More »

SQL*Plus Feature: TIMING and SET TIMING command

SET TIMING—one of the most frequently used commands—displays timing statistics on each SQL command or PL/SQL block. What if you want to collect timing statistics for multiple group of statements? TIMING command becomes handy in such situation—one of things that I knew and have forgotten over time. It can be used to collect data to do …

SQL*Plus Feature: TIMING and SET TIMING command Read More »

Oracle Database 11g: Interactive Quick Reference, Your Essential Guide to Oracle Database 11g Release 2

Last fall, I posted a note about Oracle Database 11g Architecture and Background Processes. This post is just a short note to point out that last week, Oracle University has made Oracle Database 11g Interactive Quick Reference available to public for download; it is a flash application, available for offline use in compressed file (.ZIP) …

Oracle Database 11g: Interactive Quick Reference, Your Essential Guide to Oracle Database 11g Release 2 Read More »

Enabling and Disabling Database Options

This is just a short note to point out that starting from Oracle database 11g Release 2, a command line utility, chopt (change option) is available to enable or disable a particular database feature; the tool is located under ORACLE_HOME/bin directory.  Currently, you can enable or disable the following features using this utility: Oracle Data Mining RDBMS Files, …

Enabling and Disabling Database Options Read More »

Execution Plan Operations and Options

The row source tree is the core of the execution plan. It contains the sequence of operations that the database performs to run the statement; each operation may have options associated with it. The operation in execution plan is also known as row source operator.  If you look at the below example, TABLE ACCESS operation …

Execution Plan Operations and Options Read More »

Removing table rows using an inline view

The SQL standard allows you to use an inline view in a DELETE statement, see the pseudo form below – If a condition such as key-preserved table is not met then it will result in error, “ORA-01752: cannot delete from view without exactly one key-preserved table.” I would like to show you the caveat of …

Removing table rows using an inline view Read More »

Virtual / NOSEGMENT / Fake Indexes

Virtual Indexes (aka NOSEGMENT Indexes or Fake Indexes) are useful to check whether the creation of an Index affects the execution plan with out having to create the actual index. Virtual index is just a definition without a physical index segment so it does not consume disk space. Additionally, virtual index is available to a …

Virtual / NOSEGMENT / Fake Indexes Read More »

Optimizer Index Access Paths

Access paths are ways in which data is retrieved from the database. In general, index access paths should be used for statements that retrieve a small subset of table rows, while full scans are more efficient when accessing a large portion of the table. Online transaction processing (OLTP) applications, which consist of short-running SQL statements …

Optimizer Index Access Paths Read More »