X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F35F2D1B1CB for ; Tue, 13 Jul 2004 14:08:58 -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 50191-02 for ; Tue, 13 Jul 2004 17:08:58 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 9D87CD1B1A5 for ; Tue, 13 Jul 2004 14:08:57 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i6DH8vVQ016995; Tue, 13 Jul 2004 13:08:57 -0400 (EDT) To: Bill Chandler Cc: Kris Jurka , pgsql-jdbc@postgresql.org, pgsql-perform@postgresql.org Subject: Re: [PERFORM] Cursors performance In-reply-to: <20040713161346.62000.qmail@web51404.mail.yahoo.com> References: <20040713161346.62000.qmail@web51404.mail.yahoo.com> Comments: In-reply-to Bill Chandler message dated "Tue, 13 Jul 2004 09:13:46 -0700" Date: Tue, 13 Jul 2004 13:08:57 -0400 Message-ID: <16994.1089738537@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.1 tagged_above=0.0 required=5.0 tests=MAILTO_TO_SPAM_ADDR X-Spam-Level: * X-Archive-Number: 200407/133 X-Sequence-Number: 10517 Bill Chandler writes: > One final clue before I go: if I change my wildcard to > 'NEPOOL%' from 'NEPOOL%REAL%' my query completes much > faster. Could we see the exact queries and EXPLAIN ANALYZE output for both cases? I'm wondering if the plan changes. I think that the planner will believe that the latter pattern is significantly more selective (how much more selective depends on exactly which PG version you're using); if this results in a bad row-count estimate then a bad plan could get picked. regards, tom lane