X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7D8A440BFB6 for ; Sat, 29 Jan 2005 21:52:20 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 25844-04 for ; Sat, 29 Jan 2005 21:52:19 +0000 (GMT) Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by svr1.postgresql.org (Postfix) with ESMTP id D7B6740BFA3 for ; Sat, 29 Jan 2005 21:52:17 +0000 (GMT) X-EthosMedia-Virus-Scanned: no infections found Received: from [63.195.55.98] (account josh@agliodbs.com HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 6966190; Sat, 29 Jan 2005 13:54:01 -0800 From: Josh Berkus Organization: Aglio Database Solutions To: pgsql-performance@postgresql.org Subject: Re: Performance problem with semi-large tables Date: Sat, 29 Jan 2005 13:51:10 -0800 User-Agent: KMail/1.6.2 Cc: "Ken Egervari" References: <001601c50416$57090e10$cd422418@a96dfxb4kjzogw> In-Reply-To: <001601c50416$57090e10$cd422418@a96dfxb4kjzogw> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <200501291351.10335.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.013 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/612 X-Sequence-Number: 10302 Ken, Actually, your problem isn't that generic, and might be better solved by=20 dissecting an EXPLAIN ANALYZE. > 1. Should I just change beg to change the requirements so that I can make > more specific queries and more screens to access those?=20 This is always good. > 2. Can you=20 > recommend ways so that postgres acts on big tables more efficiently? =C2= =A0I'm > not really interested in this specific case (I just made it up). =C2=A0I'= m more > interested in general solutions to this general problem of big table sizes > with bad filters and where join orders don't seem to help much. Well, you appear to be using ORDER BY ... LIMIT. Is there a corresponding= =20 index on the order by criteria? =2D-=20 Josh Berkus Aglio Database Solutions San Francisco