All, I have a question in bitmap index. It would be great if any one could clarify this... I have two scenario's. In first scenario, it is locking. But the second scenario, it is not locking. I am not sure why it is...

Scenario 1
==========

Session 1
=========

SQL> create table t_bitmap(no number,name varchar2(10),status char(1));

Table created.

SQL> ed
Wrote file afiedt.buf

1* create bitmap index biidx on t_bitmap(status)
SQL> /

Index created.

SQL>

SQL> insert into t_bitmap values(1,'Scott','M');

1 row created.

SQL>


Session 2
=========
SQL> insert into t_bitmap values(3,'John','F');


This session is hanging.....



================================================================================


Scenario 2
==========

Session 1
=========
SQL> create table t_bitmap(no number,name varchar2(10),status char(1));

Table created.

SQL> declare
2 begin
3 for i in 1.. 100 loop
4 insert into t_bitmap values(1,'Scott','F');
5 end loop;
6 end;
7 /

PL/SQL procedure successfully completed.

SQL> declare
2 begin
3 for i in 1.. 100 loop
4 insert into t_bitmap values(1,'Scott','M');
5 end loop;
6 end;
7 /

PL/SQL procedure successfully completed.

SQL> create bitmap index biidx on t_bitmap(status);

Index created.

SQL> insert into t_bitmap values(9999,'Scott','M');

1 row created.

SQL>

Session 2
==========
SQL> insert into t_bitmap values(9999,'Scott','F');

1 row created.

SQL>

Here the session is not hanging...