X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id CA3F49DCA25 for ; Wed, 14 Dec 2005 19:47:37 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 24566-05 for ; Wed, 14 Dec 2005 19:47:39 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from cassarossa.samfundet.no (cassarossa.samfundet.no [129.241.93.19]) by postgresql.org (Postfix) with ESMTP id 327EE9DCA23 for ; Wed, 14 Dec 2005 19:47:34 -0400 (AST) Received: from trofast.ipv6.sesse.net ([2001:700:300:dc03:20e:cff:fe36:a766] helo=trofast.sesse.net) by cassarossa.samfundet.no with esmtp (Exim 4.50) id 1EmgLQ-0000k9-D3 for pgsql-performance@postgresql.org; Thu, 15 Dec 2005 00:47:36 +0100 Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1EmgLQ-00036I-00 for ; Thu, 15 Dec 2005 00:47:36 +0100 Date: Thu, 15 Dec 2005 00:47:36 +0100 From: "Steinar H. Gunderson" To: pgsql-performance@postgresql.org Subject: Re: Simple Join Message-ID: <20051214234736.GA11885@uio.no> Mail-Followup-To: pgsql-performance@postgresql.org References: <200512141603.52583.blargity@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <200512141603.52583.blargity@gmail.com> X-Operating-System: Linux 2.6.14 on a x86_64 X-Message-Flag: Outlook? --> http://www.mozilla.org/products/thunderbird/ User-Agent: Mutt/1.5.11 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/341 X-Sequence-Number: 16162 On Wed, Dec 14, 2005 at 04:03:52PM -0600, Kevin Brown wrote: > -> Index Scan using paid_index on ordered_products > (cost=0.00..4954.79 rows=21759 width=16) (actual time=136.472..5966.275 > rows=18042 loops=1) > Index Cond: (paid = true) > Filter: (paid AND (NOT suspended_sub)) > Total runtime: 25136.190 ms You might want to consider an index on (paid,suspended_sub), not just (paid); it's probably not going to give you any dramatic improvements, but it could help a bit. /* Steinar */ -- Homepage: http://www.sesse.net/