Oracle PARTIAL INDEXES – a new feature in Oracle 12c, initial impression was really good, but the implementation is quite poor. With this feature, you can define INDEXING OFF for a partition so that any index with PARTIAL clause will skip this partition while creating the index. The advantage is you can selectively create indexes on partitions. And for a global index or a global partitioned index, the rows from the INDEXING OFF partitions will (more...)
Recently we had a tablespace space run out and ended up in an application failure. I have questioned my DBA and he just plainly blamed the application team members who loaded large number records without a prior notice. A convincing answer, but you can’t really fool Oracle.
Oracle introduced a new DBA_TABLESPACE_USAGE_METRICS view from 10g onwards to report the space usage with in a tablespace. I created a new tablespace and immediately (more...)
Oracle caches the data blocks in buffer cache in various modes depends on the block usage. As per the Oracle documentation it can CR (Consistent mode – reads), XCUR (Current mode – updates), FREE etc. I understand and other heard saying – whenever a block READs into memory will be in CR mode while if the block is fetching for UPDATE it will be in XCUR mode so that sessions can apply the (more...)
Bind peeking is a nice feature in Oracle to have many optimized plans for an SQL for various bind values. DBAs believe that bind peeking happens during a soft parse which will identify an alternate plan. Why do I say that?
Hard Parse: Parsing first time, nothing exists to bind peek
Soft Parse : SQL cursor is existing and executing not the first time. Under the soft parse, bind peeking (more...)
Interesting problem – database was running normally without any issues and added to OCR. But the log file started reporting a different time for all activities – for example.
Database and server is showing a time 4:25 while alertlog is ahead of 5 hours @9:25!
<pre> oracle@prod # tail alert_xxxxxxx.log Recovery of Online Redo Log: Thread 2 Group 16 Seq 129057 Reading mem 0 Mem# 0: +ORAINDEX1/prod/onlinelog/group_16.282.864560747 Mon Jan 12 (more...)
Yesterday, I have seen huge waits “enq SQ – contention’” – in every snapshot there were thousands of waits. But the fix was so simple! Here is the root cause of the issue –
When you select from a sequence, the NEXTVAL generated from a the seq$ table if it is not cached. If it is cached, it will be available in a memory structure and no need to generate the value (more...)
Happy New Year!
Oracle supplied various tools to trace the SQL and identify execution plans for the SQLs. 10046 Event, AUTOTRACE, DBMS.XPLAN etc are some of the most used tracing methods in DBAs daily life. Sometimes, we need to be very careful while using these tools specially using bind variables. Following are some test cases where wrong plans reported by the above tracing tools.
Most easiest method to get (more...)
APPEND hint in oracle is very useful, there are many benefits
Fragmented data loading – data will clustered above the HWM so that similar data will be together. Otherwise Oracle will place the records in blocks using PCT_FREE rule
- No undo will be generated – in large direct path insert will free up large amount of data blocks
- Less CBC latches (because of no UNDO blocks), less CPU usage
- Readers need not undo the records, (more...)
When you execute an SQL – why there is a difference in Consistent gets on the same set of data for same SQL. For any SELECT query, oracle need to prepare the consistent data in the buffer cache using undo records then forward the data the requesting session as of a specific SCN. Touching any block in buffer cache to prepare the blocks for consistent data is known as Consistent Reads.
In an (more...)
Adieu to 2013 with this small post! Happy new year to every one.
Oracle controls the incremental checkpoint frequency or interval based on the parameter FAST_START_MTTR_TARGET or LOG_CHECKPOINT_INTERVAL. But, can you see the real checkpoint interval values? What is the elapsed time between checkpoints?
Yes, you can. (more...)