X-Original-To: pgsql-performance@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D108B4761AD for ; Tue, 4 Mar 2003 12:20:29 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 40204-07 for ; Tue, 4 Mar 2003 12:20:27 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id D4CAE476224 for ; Tue, 4 Mar 2003 12:20:22 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.8/8.12.8) with ESMTP id h24HKQx6025726; Tue, 4 Mar 2003 12:20:26 -0500 (EST) To: Robert Treat Cc: Paul McKay , pgsql-performance@postgresql.org Subject: Re: Slow query performance on large table In-reply-to: <1046797349.16957.20.camel@camel> References: <000001c2e268$b1e47210$0c64a8c0@paulspc> <1046797349.16957.20.camel@camel> Comments: In-reply-to Robert Treat message dated "04 Mar 2003 12:02:29 -0500" Date: Tue, 04 Mar 2003 12:20:26 -0500 Message-ID: <25725.1046798426@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new X-Archive-Number: 200303/14 X-Sequence-Number: 1312 Robert Treat writes: > Maybe it's just me, but I get the feeling you need to work some regular > reindexing into your maintenance schedule. Or at least, more vacuuming... > Given your query is using > between, I don't think it would use the index on the time field anyway > (and explain analyze seems to be supporting this). Rewrite it so that > you have a and time > foo and time < bar and I think you'll see a > difference. No, you won't, because that's exactly what BETWEEN is. regards, tom lane