Hi, I heard that, update will be very slow in bitmap index. I just created a table with bitmap index and ran the update on the table. Again i dropped the bitmap index and ran the same update. I do not see any time difference.

My question is, does bitmap index slow down the update statement??

02:19:31 SQL> create table t_bitmap(no number,name varchar2(20),sex char(1));

Table created.

02:19:31 SQL>
02:19:31 SQL> create bitmap index bidx on t_bitmap(sex);

Index created.

02:19:31 SQL>
02:19:40 SQL> declare
02:19:40 2 cursor c1 is select * from t_bitmap;
02:19:40 3 x number:=1;
02:19:40 4 begin
02:19:40 5 for i in 1..10000 loop
02:19:40 6 insert into t_bitmap values(x,'Scott','M');
02:19:40 7 x := x+1;
02:19:40 8 end loop;
02:19:40 9 end;
02:19:40 10 /

PL/SQL procedure successfully completed.

02:19:44 SQL>
02:20:12 SQL>
02:20:12 SQL> declare
02:20:12 2 cursor c1 is select * from t_bitmap;
02:20:12 3 x number:=10001;
02:20:12 4 begin
02:20:12 5 for i in 1..10000 loop
02:20:12 6 insert into t_bitmap values(x,'Fran','F');
02:20:12 7 x := x+1;
02:20:12 8 end loop;
02:20:12 9 end;
02:20:12 10 /

PL/SQL procedure successfully completed.

02:20:15 SQL> commit;

Commit complete.

02:20:17 SQL> execute DBMS_STATS.gather_table_stats (ownname=> 'SCOTT',tabname => 'T_BITMAP',estim
ate_percent => 100,method_opt=> 'FOR ALL COLUMNS SIZE 1',CASCADE=> TRUE);

PL/SQL procedure successfully completed.

02:20:44 SQL>
02:20:45 SQL>
02:21:16 SQL>
02:21:16 SQL>
02:21:16 SQL> declare
02:21:16 2 cursor c1 is select * from t_bitmap;
02:21:16 3 x number:=1;
02:21:16 4 begin
02:21:16 5 for i in c1 loop
02:21:16 6 update t_bitmap set sex=sex where no = x;
02:21:16 7 x := x+1;
02:21:16 8 end loop;
02:21:16 9 end;
02:21:16 10 /

PL/SQL procedure successfully completed.

02:22:08 SQL> rollback;

Rollback complete.

02:22:29 SQL> drop index bidx;

Index dropped.

02:22:32 SQL>
02:22:37 SQL>
02:22:37 SQL>
02:22:37 SQL> declare
02:22:37 2 cursor c1 is select * from t_bitmap;
02:22:37 3 x number:=1;
02:22:37 4 begin
02:22:37 5 for i in c1 loop
02:22:37 6 update t_bitmap set sex=sex where no = x;
02:22:37 7 x := x+1;
02:22:37 8 end loop;
02:22:37 9 end;
02:22:37 10 /

PL/SQL procedure successfully completed.

02:23:29 SQL>