On Sat, Aug 22, 2009 at 10:47:11PM +0200, Fabian Groffen wrote:
On 22-08-2009 09:57:22 +0200, Stefan Manegold wrote:
ps: It is interesting to hear that the "vacuum" command in PostgreSQL had a significant impact on a simple select * from table query over bulk-loaded data, i.e., without any updates being performed --- I wouldn't know wht akind of "garbage" bulk-loading leaves behind that needs to be cleaned-up ...
If I recall correctly, vacuum also calls analyze implicitly, which means statistics are being built, and hence a simple select * from X, can be answered from the statistics without even looking at table X itself.
it's a "select * from X", not a "select count(*) form X"; hence, the statistics can IMHO only answer that query, if the statistics (also) contain all the data of table X ... ;-) Stefan -- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |