
prompt
prompt 'create table eoda.t'
declare row_count number(5);
begin
	select count(1) into row_count from user_tables where table_name = upper('t');
	if row_count = 1 then
		execute immediate 'drop table eoda.t';
	end if;
	execute immediate 'create table eoda.t (x int, constraint t_pk primary key(x))';
end;
/

prompt
prompt 'insert data into eoda.t'
begin
	insert into eoda.t values (1);
	insert into eoda.t values (2);
	insert into eoda.t values (999999999);
end;
/

analyze index eoda.t_pk validate structure;
select lf_blks,BR_BLKS,BTREE_SPACE from index_stats;

prompt
prompt 'reinsert data to eoda.t'
begin
	for i in 2 .. 10000
	loop
		delete from eoda.t where x = i;
		commit;
		insert into eoda.t values (i + 1);
		commit;
	end loop;
end;
/

analyze index eoda.t_pk validate structure;
select lf_blks,BR_BLKS,BTREE_SPACE from index_stats;
