UPDATE STATISTICS in OnLine 7.10.UC1
Posted in 1995
Topics: Stored Procedures & SPL
I've found that UPDATE STATISTICS in OnLine Dynamic Server 7.10.UC1 causes
aggregate function MAX(index_column) run very slowly. I use ICL SuperServer
(with Sparc processor).
The execution time of MAX() in the example below is less then 1 second
immediately after creating an index and 17-18 seconds after UPDATE STATISTICS
(it does not matter whether it is LOW, HIGH or MEDIUM). Can anyone explain
this strange behavior ? Is this a known bug ?
{ ### SQL script that creates table and shows this phenomenon #### }
create table tab1
(
kol1 char(20),kol2 integer
);
create procedure ins_tab1()
define i integer; for i in (1 to 80000)
insert into tab1(kol2) values(i); end for;
end procedure;
execute procedure ins_tab1();
create index ikol2 on tab1(kol2);
{ ## Select current is to measure execution time of the next select ## }
select current hour to second , "New index" from tab1 where kol2=1;
select max(kol2) from tab1;
select current hour to second from tab1 where kol2=1;
update statistics low for table tab1;
select current hour to second , "Update statistics low" from tab1 where kol2=1;
select max(kol2) from tab1;
select current hour to second from tab1 where kol2=1;
update statistics high for table tab1;
select current hour to second , "Update statistics high" from tab1 where kol2=1;
select max(kol2) from tab1;
select current hour to second from tab1 where kol2=1;
#####################################################
The results on my machine are:
16:18:42 New index
16:18:42
16:19:11 Update statistics low
16:19:28 (17s)
16:20:37 Update statistics high
16:20:56 (19s)
TIA,
Ewa Bitner, ( E.Bitner.pol0101@oasis.icl.co.uk )