Re: update statistics
Posted in 2007
A good starting point for update statistics:
for every table:
update statistics low for table <table> (<all columns that are part of anindex>);
update statistics high for table <table> (<all columns that head an index>)distributions only;
update statistics medium for table <table> (<all columns not included inupdate stats high>);
example:
create table tab1 (
col1 int,
col2 int,
col3 int,
col4 int,
col5 int
);
create index idx1 on tab1 (col1, col2, col3);
create index idx2 on tab1 (col4);
create index idx3 on tab1 (col2, col5);
update statistics low for table tab1 (col1, col2, col3, col4, col5);
update statistics high for table tab1 (col1, col2, col4) distributions only;
update statistics medium for table tab1 (col3, col5);
and the following can influence how fast update statistics run
DBUPSPACE
PSORT_NPROCS
PSORT_DBTEMP
PDQPRIORITY
Andrew
----- Original Message -----
From: Bill64bits
To: informix-list@iiug.org
Sent: Sunday, March 04, 2007 5:47 PM
Subject: update statistics
The IBM web page at
http://www-1.ibm.com/support/docview.wss?rs=0&context=SSGU5D&context=SSHMMC&context=SSGU8G&context=SSGKNY&context=SSGU5Y&context=SSCRW7&context=SSGHZP&context=SSVT2J&q1=update+statistics&uid=swg21137764&loc=en_GB&cs=utf-8&lang=
says to update statistics thusly:
1. Run UPDATE STATISTICS LOW on all tables in the database.
2. Run UPDATE STATISTICS MEDIUM on all columns which are in an index, but
are not the first column of any index.
3. Run UPDATE STATISTICS HIGH on all columns which are the first column in
an index.
4. Run UPDATE STATISTICS on all stored procedures.
I thought someone on this group propounded the proper sequence as
1. medium on all tables
2. high on heads of indexes
3. medium on tails
Which is correct?
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list