bitmap indexes performance

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
reachmexyz
Premium Member
Premium Member
Posts: 296
Joined: Sun Nov 16, 2008 7:41 pm

bitmap indexes performance

Post by reachmexyz »

Hello all

I have a fact table with aroung 12 bitmap indexes each on a individual field. Now the load process is very slow because of these indexes.
Is there any way i can disable all these indexes before loading and then enable later. Can i use OCI stage for this
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Oracle bitmap indexes are a well known issue with ETL. You need to drop/disable, load, and rebuild these indexes during your ETL cycle. You need to read up on bitmap indexes to understand why. The short answer is that a bitmap can have only a few entries that span the entire table. Inserting/updating causes significant index maintenance overhead, as you're experiencing.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
reachmexyz
Premium Member
Premium Member
Posts: 296
Joined: Sun Nov 16, 2008 7:41 pm

Post by reachmexyz »

kcbland wrote:Oracle bitmap indexes are a well known issue with ETL. You need to drop/disable, load, and rebuild these indexes during your ETL cycle. You need to read up on bitmap indexes to understand why. The short answer is that a bitmap can have only a few entries that span the entire table. Inserting/updating causes significant index maintenance overhead, as you're experiencing.
I understand i can disable indexes before loading and then recreate after the load is complete.
Can i automate this disabling and enabling of indexes in OCI Stage.
If i have 12 indexes on a table can i disable 12 bitmap indexes in before sql on OCI and then later enable all the indexes on After SQL of OCI.
Can you please tell me how can i do it?
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Sure. We do that in our warehouse every night. Use the before/after sql tabs to drop and create indices respectively. For multiple drops and creates seperate the commands with double semi colons (;;).
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Your connection user most likely won't have permissions to do this, or really shouldn't. Have procs created to drop/rebuild them and then get permission to execute the procs, do so before- and after-sql.
-craig

"You can never have too many knives" -- Logan Nine Fingers
reachmexyz
Premium Member
Premium Member
Posts: 296
Joined: Sun Nov 16, 2008 7:41 pm

Post by reachmexyz »

DSguru2B wrote:Sure. We do that in our warehouse every night. Use the before/after sql tabs to drop and create indices respectively. For multiple drops and creates seperate the commands with double semi colons (;;).
I got the permissions to drop and create indexes and when i tried in before SQL, response is "invalid option".
I tried to execute the below command if my table name is xxx, schema name is sss
drop bitmap index index_name on sss.xxx;;
drop bitmap index index_name2 on sss.xxx;;

Can you please tell me whether the command i am using is syntatically wrong or there is any other way dropping bitmap indexes.
betterthanever
Participant
Posts: 152
Joined: Tue Jan 13, 2009 8:59 am

Post by betterthanever »

try in OPEN/CLOSE command.

Code: Select all

BEGIN
sql;
commit;
end;
reachmexyz
Premium Member
Premium Member
Posts: 296
Joined: Sun Nov 16, 2008 7:41 pm

Post by reachmexyz »

betterthanever wrote:try in OPEN/CLOSE command.

Code: Select all

BEGIN
sql;
commit;
end;
i am trying to do drop the indexes in before sql of OCI stage.
Can you please tell me what is this open/close command.
Also in the script does sql; means all the drop commands?
betterthanever
Participant
Posts: 152
Joined: Tue Jan 13, 2009 8:59 am

Post by betterthanever »

i am also referring to the same before sql you are talking about in OCI stage...

just mentioned the syntax of using it.
Post Reply