Can UPDATE STATISTICS screw up the optimizer?
Posted in 1996
Are rows inserted to the table prior to the deletion? IS update STATS occuring before you do the deletion? ------------------------------------------------------------------------- Cheryl Kendricks Internet:cherylk@prod1.jcdc.doleta.gov OR cherylk@gwysmtp.jcdc.doleta.gov DTSI, Inc. Database Administrator - DOL Job Corps San Marcos, Texas ------------------------------------------------------------------------ On Thu, 18 Jul 1996 Bashar.Chalabi@rmy.emory.edu wrote: } 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. (SNIP) } the procedure takes 30 seconds. } } } On the other hand, if we do: } } delete all rows in the table } } 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 }