SQL & PL/SQL

SQL and PL/SQL Articles

Part 2 - The Bitmap Supremacy

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.

articles: 

Part 3 - The Bitmap Dominion

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.

articles: 

Deterministic function vs scalar subquery caching. Part 1

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.

articles: 

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

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

articles: 

Oracle Z to A -- I N

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

articles: 

Diff B/W Truncate & Delete

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

articles: 

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

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.

articles: 

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

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);

articles: 

Please use ANSI join syntax

articles: 

Pages

Subscribe to RSS - SQL & PL/SQL