Skip to main content
added 1071 characters in body
Source Link
Dmitry Demin
  • 2.1k
  • 2
  • 19
  • 20
create table test_update(p1,p2,p3,p4 ) PCTFREE 1 INITRANS 1 MAXTRANS 255 TABLESPACE arhiv_data as SELECT a.n_p_u, a.id_reg, a.id_vag, a.vrsvop FROM a_vag_atr a; SELECT count(*)  FROM asuds.test_update a ==> COUNT(*) -------------------------------------------- 39915830 CREATE INDEX test_ind ON test_update ( p1 ASC ) 

For example 3. if you insert into table not indexed then the number of rows is exactly the USED_UREC = 500000.

USERNAME PROGRAM COMMAND USED_UREC USED_UBLK COMMAND_1 

 ASUDS sqlnavigator.exe 2 500000 5815 Insert 

For example 4. if you delete from table not indexed then the number of rows is exactly the USED_UREC.

Session 1

 SELECT count(*) FROM test_update a ==> COUNT(*)    -------- 500000 delete from test_update ==> 500000 row(s) deleted 

Session 2

 USERNAME PROGRAM COMMAND USED_UREC USED_UBLK COMMAND_1 ---------------- ---------------------- ------------------- -------------------- ASUDS ASUDS sqlnavigator.exe 7 2 500000 500000 58159616 Insert Delete  
create table test_update(p1,p2,p3,p4 ) PCTFREE 1 INITRANS 1 MAXTRANS 255 TABLESPACE arhiv_data as SELECT a.n_p_u, a.id_reg, a.id_vag, a.vrsvop FROM a_vag_atr a; SELECT count(*)  FROM asuds.test_update a ==> COUNT(*) -------------------------------------------- 39915830 CREATE INDEX test_ind ON test_update ( p1 ASC ) 

For example 3. if you insert into table not indexed then the number of rows is exactly the USED_UREC = 500000.

USERNAME PROGRAM COMMAND USED_UREC USED_UBLK COMMAND_1 ---------------- ---------------------- ------------------- -------------------- ASUDS sqlnavigator.exe 2 500000 5815 Insert 
create table test_update(p1,p2,p3,p4 ) PCTFREE 1 INITRANS 1 MAXTRANS 255 TABLESPACE arhiv_data as SELECT a.n_p_u, a.id_reg, a.id_vag, a.vrsvop FROM a_vag_atr a; SELECT count(*) FROM test_update a ==> COUNT(*) -------------------------------------------- 39915830 CREATE INDEX test_ind ON test_update ( p1 ASC ) 

For example 3. if you insert into table not indexed then the number of rows is exactly the USED_UREC.

USERNAME PROGRAM COMMAND USED_UREC USED_UBLK COMMAND_1 

 ASUDS sqlnavigator.exe 2 500000 5815 Insert 

For example 4. if you delete from table not indexed then the number of rows is exactly the USED_UREC.

Session 1

 SELECT count(*) FROM test_update a ==> COUNT(*)    -------- 500000 delete from test_update ==> 500000 row(s) deleted 

Session 2

 USERNAME PROGRAM COMMAND USED_UREC USED_UBLK COMMAND_1 ---------------- ---------------------- ------------------- -------------------- ASUDS sqlnavigator.exe 7 500000 9616  Delete  
added 1071 characters in body
Source Link
Dmitry Demin
  • 2.1k
  • 2
  • 19
  • 20

For example 3. if you insert into table not indexed then the number of rows is exactly the USED_UREC = 500000.

create table test_update(p1,p2,p3,p4 ) PCTFREE 1 INITRANS 1 MAXTRANS 255 TABLESPACE arhiv_data SELECT count(*) FROM test_update a ==> COUNT(*) -------- 0 

Session 1

declare i pls_integer:=1; begin for i in 1..500000 loop insert into test_update(p1,p2,p3,p4) values(1,2,3,sysdate); end loop; end; select count(*) from test_update ==> COUNT(*) ----------- 500000 

Session 2

USERNAME PROGRAM COMMAND USED_UREC USED_UBLK COMMAND_1 ---------------- ---------------------- ------------------- -------------------- ASUDS sqlnavigator.exe 2 500000 5815 Insert 

For example 3. if you insert into table not indexed then the number of rows is exactly the USED_UREC = 500000.

create table test_update(p1,p2,p3,p4 ) PCTFREE 1 INITRANS 1 MAXTRANS 255 TABLESPACE arhiv_data SELECT count(*) FROM test_update a ==> COUNT(*) -------- 0 

Session 1

declare i pls_integer:=1; begin for i in 1..500000 loop insert into test_update(p1,p2,p3,p4) values(1,2,3,sysdate); end loop; end; select count(*) from test_update ==> COUNT(*) ----------- 500000 

Session 2

USERNAME PROGRAM COMMAND USED_UREC USED_UBLK COMMAND_1 ---------------- ---------------------- ------------------- -------------------- ASUDS sqlnavigator.exe 2 500000 5815 Insert 
deleted 6 characters in body
Source Link
Dmitry Demin
  • 2.1k
  • 2
  • 19
  • 20
create table test_update(p1,p2,p3,p4 ) PCTFREE 1 INITRANS 1 MAXTRANS 255 TABLESPACE arhiv_data as SELECT a.n_p_u, a.id_reg, a.id_vag, a.vrsvop FROM a_vag_atr a; SELECT count(*) FROM asuds.test_update a ==> COUNT(*) -------------------------------------------- 39915830 
create table test_update(p1,p2,p3,p4 ) PCTFREE 1 INITRANS 1 MAXTRANS 255 TABLESPACE arhiv_data as SELECT a.n_p_u, a.id_reg, a.id_vag, a.vrsvop FROM a_vag_atr a; SELECT count(*) FROM asuds.test_update a ==> COUNT(*) -------------------------------------------- 39915830 
create table test_update(p1,p2,p3,p4 ) PCTFREE 1 INITRANS 1 MAXTRANS 255 TABLESPACE arhiv_data as SELECT a.n_p_u, a.id_reg, a.id_vag, a.vrsvop FROM a_vag_atr a; SELECT count(*) FROM test_update a ==> COUNT(*) -------------------------------------------- 39915830 
added 247 characters in body
Source Link
Dmitry Demin
  • 2.1k
  • 2
  • 19
  • 20
Loading
added 1002 characters in body
Source Link
Dmitry Demin
  • 2.1k
  • 2
  • 19
  • 20
Loading
added 324 characters in body
Source Link
Dmitry Demin
  • 2.1k
  • 2
  • 19
  • 20
Loading
Source Link
Dmitry Demin
  • 2.1k
  • 2
  • 19
  • 20
Loading