FW: Update statistics
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Sorry, keep on forgetting about MIME (using Microsoft Outlook). Here is
another copy -
I've read about this in the manuals, I've asked advise and looked at
samples, but update statistics is still not 100% clear to me.
I also got different answers from different people with regards to how it
must be done. On my machine I run -
update statistics low drop distributions; (whole database)
update statistics high (for all leading columns indexes - using the
sysindexes.part1 column)
update statistics medium (for all other columns used in indexes -
nonleading columns in indexes)
update statistics for procedure;
Is this correct ?
I've also written a 4gl program (because I don't like the scripts too much)
that is a little different -
I still run update statistics low drop distributions; (whole database)
it will then update statistics high for all leading columns in indexes, and
on all other columns (if they are used in indexes or not) I run update
statistics medium.
Can anyone give me a short and exact answer as to how it must be done ?
Thanks
Dirk
Dirk Moolman
Database Administrator
Reach Technologies
"Bravery is the capacity to perform properly even when scared half to
death."
- General Omar Bradley
>>>>> " " == Dirk Moolman <dirkm@reach.co.za> writes:
> I've read about this in the manuals, I've asked advise and
> looked at samples, but update statistics is still not 100%
> clear to me.
> I also got different answers from different people with regards
> to how it must be done. On my machine I run -
> update statistics low drop distributions; (whole database)
> update statistics high (for all leading columns indexes - using > the sysindexes.part1 column) update statistics medium (for all
> other columns used in indexes - nonleading columns in indexes)
> update statistics for procedure;
> Is this correct ?
I dunno. However, you may find Art Kagel's dostats utility to be
helpful at providing a very good first guess as to how to update
statistics properly. Look in www.iiug.org under DB Adminstration Tools
you'll find it packaged along with other very useful stuff in a file
called utils_ak2. It requires ESQL/C which you can get for free at
www.intraware.com.
HTH,
Mark
--
"Lack of will power has caused more failure than lack of intelligence
or ability."
-- Flower A. Newhouse
We set up Douglas Wilson's updstats perl script to create the update statistics
SQL.
It runs every evening after backups..
http://www.iiug.org/members/memb_software/archive/upd_stats
Dirk Moolman wrote:
> Sorry, keep on forgetting about MIME (using Microsoft Outlook). Here is
> another copy -
>
> I've read about this in the manuals, I've asked advise and looked at
> samples, but update statistics is still not 100% clear to me.
>
> I also got different answers from different people with regards to how it
> must be done. On my machine I run -
>
> update statistics low drop distributions; (whole database)
> update statistics high (for all leading columns indexes - using the
> sysindexes.part1 column)
> update statistics medium (for all other columns used in indexes -
> nonleading columns in indexes)
> update statistics for procedure;>
> Is this correct ?
>
> I've also written a 4gl program (because I don't like the scripts too much)
> that is a little different -
>
> I still run update statistics low drop distributions; (whole database)
> it will then update statistics high for all leading columns in indexes, and
> on all other columns (if they are used in indexes or not) I run update
> statistics medium.
>
> Can anyone give me a short and exact answer as to how it must be done ?
>
> Thanks
> Dirk
>
> Dirk Moolman
> Database Administrator
> Reach Technologies
>
> "Bravery is the capacity to perform properly even when scared half to
> death."
> - General Omar Bradley