X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id E30E1D1B9DF for ; Sat, 30 Aug 2003 14:36:06 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 37301-05 for ; Sat, 30 Aug 2003 11:35:57 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id B9E54D1BA68 for ; Sat, 30 Aug 2003 11:35:55 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h7UEZqjX022272; Sat, 30 Aug 2003 10:35:52 -0400 (EDT) To: Ken Geis Cc: Bruno Wolff III , pgsql-performance@postgresql.org Subject: Re: bad estimates In-reply-to: <3F50308E.6070100@speakeasy.org> References: <20030829025109.GD4373@wolff.to> <3F4EBF7E.8020602@speakeasy.org> <20030829030156.GF4373@wolff.to> <3F4EC1D0.5010503@speakeasy.org> <20030829033818.GA5577@wolff.to> <3F4ECC78.7090502@speakeasy.org> <20030829040519.GA5746@wolff.to> <3F4ED1DC.50808@speakeasy.org> <20030829042453.GA5931@wolff.to> <3F4F0777.8090503@speakeasy.org> <20030830025503.GA30691@wolff.to> <3F50308E.6070100@speakeasy.org> Comments: In-reply-to Ken Geis message dated "Fri, 29 Aug 2003 22:05:18 -0700" Date: Sat, 30 Aug 2003 10:35:52 -0400 Message-ID: <22271.1062254152@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/531 X-Sequence-Number: 3347 Ken Geis writes: > From what I've learned, we want to convince the optimizer to use a > table scan; that's a good thing. I want it to use hashed aggregates, > but I can't convince it to (unless maybe I removed all of the > statistics.) You probably just need to increase sort_mem. Multiple aggregates take more RAM to process in a hashtable style ... regards, tom lane