Re: The Fastest Way To Delete All Rows In A Table
Posted in 1999
Topics: Third-Party Tools & Monitoring
Neil Truby schrieb: > > Which statistics? The ones relating to the state of the table when it had > 200,000 rows that it no longer has? > I'm not sure what your requirement is here - if you're deleting all the rows > what point is there in retaining out-of-date statistics about it? > > Neil Truby > Londis Stores > Hampton Hill, UK Hi Neil, in some cases it makes sense to have the statistics of non-existing rows: Immagine one processes which fills up a table over day. If this one is a daemon-proccess which does a prepare of all sql-statements at startup (when the table is empty). These processes may have a slowing-down behaviour when the table is filled up. The only thing that would help in such a scenario would be an update-statistics with a following re-prepare of the sql-statements sometimes over the day. But in a worst-case-scenario this can't be done a) as the process would miss critical responce time in this moment or b) as the process is a third-party-binary, whose source is out of your reach. [ And really worst: your window of time for deleting the rows is too small. ;-) ] [ But there is allways a solution: Through a bunch of usefull hardware on your ] [ system like disks (solid-state for the loggs), memory, cpu's,.. ] [ Have i heared some cheers at IBM, HP, SUN, Compaq, Siemens, EMC, ... ? ] hth martin berns
forget to say: Or upgrade to 7.30 and use optimizer hints. If you can't controll the binary, you may consider to use I-Spy to change the each statement in the appropiate way in the I-Spy-Proxy. And the cheers may now come from Menlo Park;-) martin