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 9F495D1B248 for ; Tue, 29 Jun 2004 05:37:39 -0300 (ADT) 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 02566-07 for ; Tue, 29 Jun 2004 08:37:32 +0000 (GMT) Received: from mproxy.gmail.com (mproxy.gmail.com [216.239.56.240]) by svr1.postgresql.org (Postfix) with SMTP id 6FC00D1B1D2 for ; Tue, 29 Jun 2004 05:37:29 -0300 (ADT) Received: by mproxy.gmail.com with SMTP id w29so557412cwb for ; Tue, 29 Jun 2004 01:37:30 -0700 (PDT) Received: by 10.38.104.46 with SMTP id b46mr51523rnc; Tue, 29 Jun 2004 01:37:30 -0700 (PDT) Message-ID: Date: Tue, 29 Jun 2004 01:37:30 -0700 From: Chris Cheston To: Christopher Kings-Lynne Subject: Re: postgres 7.4 at 100% Cc: pgsql-performance@postgresql.org In-Reply-To: <40E1266D.3040607@familyhealth.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <1088397641.1105.10.camel@localhost> <17884.1088399982@sss.pgh.pa.us> <200406280947.59420.josh@agliodbs.com> <40E1266D.3040607@familyhealth.com.au> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/286 X-Sequence-Number: 7344 ok i just vacuumed it and it's taking slightly longer now to execute (only about 8 ms longer, to around 701 ms). Not using indexes for calllogs(from)... should I? The values for calllogs(from) are not unique (sorry if I'm misunderstanding your point). Thanks, Chris On Tue, 29 Jun 2004 16:21:01 +0800, Christopher Kings-Lynne wrote: > > > live=# explain analyze SELECT id FROM calllogs WHERE from = 'you'; > > QUERY PLAN > > ---------------------------------------------------------------------------------------------------------- > > Seq Scan on calllogs (cost=0.00..136.11 rows=24 width=4) (actual > > time=0.30..574.72 rows=143485 loops=1) > > Filter: (from = 'you'::character varying) > > Total runtime: 676.24 msec > > (3 rows) > > Have you got an index on calllogs(from)? > > Have you vacuumed and analyzed that table recently? > > Chris > >