SQL & PL/SQL

SQL and PL/SQL Articles

Part 1 - The Bitmap Identity

articles: 

What is a Bitmap Index?

This is first post of the four-part epic - The Bitmap Conspiracy - detailing the structure and behaviour of Bitmap Indexes. Later in the series we will cover the internal structure of Bitmap Indexes, how Oracle uses them, and finally we will expose some of the myths surrounding them. But before we get there let’s just get a clear understanding of what a Bitmap Index actually is.

Part 2 - The Bitmap Supremacy

articles: 

The Structure of a Bitmap Index

I’ve been tuning Oracle database applications for a long time now. I started out recognising some simple patterns and applying template fixes (Got a full table scan? Use an index!) but such a collection of “Do this; don’t do that” anecdotes will only take you so far. If you are curious (I was), you can uncover the reasons why one method is faster than another; i.e. what is the computer doing to make slow code so slow. I found that a good understanding of the internals meant that you didn’t always need to know how to tune a specific example because you could work it out for yourself.

In a database application, these investigations frequently lead to data structures; how does the database store its information and how does it retrieve it? Good information on the internals of Bitmap Indexes is hard to piece together, so in Part 2 of this Bitmap Indexing epic we will look more closely at the internals of Bitmap indexes.

Part 3 - The Bitmap Dominion

articles: 

Bitmap Execution Plans


This is Part 3 of The Bitmap Conspiracy, a four part epic on Bitmap Indexes.

In Part 1 we touched briefly on how Oracle can use Bitmap Indexes to resolve queries by translating equality and range predicates into bitmap retrievals. Now that we know more about how they are stored (see Part 2), let’s look closer at some of the operations that Oracle uses to access Bitmap Indexes and manipulate bitmaps.

Deterministic function vs scalar subquery caching. Part 1

articles: 

I recently did a comparison caching mechanisms of scalar subquery caching(SSC) and deterministic functions in 11.2. Unfortunately, I do not have enough time to do a full analysis, so I will post it in parts.

Just another version of Tom Kyte’s runstats (runstats_pkg)

articles: 

I want to share my modifications of Tom Kyte's runstats package, which include:


  • Any number of runs sets for analyzing

  • Standalone: No need to create other objects

  • Ability to specify session SID for statistics gathering

  • Ability to specify what to gather: latches, stats or both

  • Separate mask filters for output by statname and latchname

  • Ability to specify difference percentage for output separately for latches and statistics

Oracle Z to A -- I N

articles: 

Oracle Database A to Z question and answers and
very importantly the Experiences also you can share here...

The Blog is for Both the beginners and as well as experienced people to discuss and gain knowledge in Oracle.

Here we are going to share every thing about Oracle....

And Simply saying, we will only work on oracle related but nothing else here....

We will Eat Oracle, Drink Oracle and Walk Oracle

Diff B/W Truncate & Delete

articles: 

Delete
1.DML data can be recovered by rollback before commit
2.Remove any subset of data
3.Delete is slower when table have numerous indexes and triggers
4.DML triggers fire for delete mthod
5.data can be recovered after commit by flashback method
6.high water mark will remain the same
7.data deleted info capture with returning clause
8. you can not delete data if function based index is invalid
9. can not delete data from complex views.
10. Space is not freed

What data type should I use: CHAR or VARCHAR2???

articles: 

Hi,

We all know that CHAR and VARCHAR2 are two different datatypes used for storing strings in Oracle. When I asked many people about what’s the difference exactly, all were saying VARCHAR2 can be used for variable sized character strings. As I’m not satesfied with the answer, as always, I’ve decided to do my own experiments on these two. Please find the exercise I’ve performed below.

SQL> create table t1 (col1 char(10), col2 varchar2(10));

Table created.

SQL> insert into t1 values(‘Oracle’,'Oracle’);

1 row created.

Impact on Packages - Assign permissions directly vs Assign permission via Roles

articles: 

Document depicts how Roles and Privileges behave for Packages

DB Version: 10.2.0.4

Users: TESTUSR (Table Owner)
TESTUSR_PKG (Package Onwer)
TESTUSR_APP (Application Owner)

Roles: TESTUSR_APP_ROLE
TESTUSR_PKG_ROLE

Table: TEST_TBL
Package: TEST_PKG

Table Text:
create table test_tbl(a number);

Pages

Subscribe to RSS - SQL & PL/SQL