Re: Can UPDATE STATISTICS screw up the optimizer?
Posted in 1996
In article <837693419.22432.0@basharlp.ctl.com>, Bashar Chalabi <?@?.?>
writes
>He have a stored procedure that updates all records in a table in a
>foreach loop. Within the loop, it selects records from the table it is
>updating as well as other (static) tables, all with less than 1000 rows.
>
>If we do the following:
>
>delete all rows in the table
>update statistics>load 100 rows
>update statistics>run the procedure
>
>the procedure takes 30 seconds.
>
>
>On the other hand, if we do:
>
>delete all rows in the table
>update statistics>load 100 rows
>run the procedure
>
>it takes 7 seconds!!!
>
>Can update statistics actually screw up the optimizer? If so, when?
>We tried low, medium and high statistics, to the same effect.
>
>Platform is Online 7.1 on SCO OSR5, Pentium PRO 200MHz, 128MB RAM.
>
>Bashar Chalabi
>Card Tech Limited
>bashar@ctl.com
It might not be statistics - are there any indexes on the table - do
you drop/recreate them??
--
David Williams