Re: UPDATE STATISTICS Question
Posted in 2001
David Williams wrote: > > In article <3a5e552c$1@news.iprimus.com.au>, Andrew Hamm > <ahamm@sanderson.net.au> writes > >Andrew Hamm wrote in message <3a5e4380$1@news.iprimus.com.au>... > >>Lucky Leavell [RIS] wrote in message ... > >>>Informix 7.31 > >>> > >>> In the Performance Guide (or was it the SQL Syntax Guide), it states > >>> that one should use HIGH for the entire table on small tables. Just > >>> what qualifies as a "small" table: 1000 rows? 100,000 rows? ?? > >>> > >> > >FOUND IT! Informix Tech Notes, Volume 9, Issue 4, page 7 > > > >and I quote: > > > >"Based on the sampling techniques used by the UPDATE STATISTICS command, any > >table with more than 26,570 rows is considered a "very large" table. > > > > One for the FAQ! The sample size table I have has a sample size of 106275 records for RESOLUTION 0.5 and CONFIDENCE 0.99. The RESOLUTION can go as low as 0.005 or 1/<records in table>, whichever is the greater. Here is the sample size based on resolution and confidence: Resolution <------------ Confidence ------------> .80 .85 .90 .95 .99 10.0 115 130 149 185 266 5.0 458 520 596 740 1064 2.5 1832 2080 2384 2960 4256 1.0 11450 13000 14880 18500 26570 0.5 45796 52030 59561 74063 106275 However, both MEDIUM and HIGH read ALL records in the table, it's just that MEDIUM sends just a sample of them to the sort routine. The sample size used by MEDIUM is NOT based on the number of records in the table. Cheers, -- Mark. +----------------------------------------------------------+-----------+ | Mark D. Stock mailto:mdstock@mydas.freeserve.co.uk |//////// /| | http://www.informix.com http://www.informixhandbook.com |///// / //| | http://www.iiug.org +-----------------------------------+//// / ///| | |This email will self-destruct in |/// / ////| | |10 sec. If you received this email |// / /////| | |in error, sorry about the mess. |/ ////////| +----------------------+-----------------------------------+-----------+