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 58DAB52886 for ; Tue, 21 Jun 2005 04:42:37 -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 86914-05 for ; Tue, 21 Jun 2005 07:42:30 +0000 (GMT) Received: from web8304.mail.in.yahoo.com (web8304.mail.in.yahoo.com [202.43.219.216]) by svr1.postgresql.org (Postfix) with SMTP id 643475284B for ; Tue, 21 Jun 2005 04:42:27 -0300 (ADT) Received: (qmail 39684 invoked by uid 60001); 21 Jun 2005 07:42:23 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=CQ7NkrOBgn0QL73fKUCFY6GUy7Eqqt/3QnhxjjbmBdqs1Fn9QxOcKP/20kDM88m9a2150UVKTHy2f/Ph6lmv7xZNnPCCoR8sWRRdHUjZOM13VOt+mgelECNN7OIRPb6eWtWTpbBDKGSIxa5/jPbLaKw0PPyMSdU0S3J0n+Cbmaw= ; Message-ID: <20050621074223.39682.qmail@web8304.mail.in.yahoo.com> Received: from [203.101.103.131] by web8304.mail.in.yahoo.com via HTTP; Tue, 21 Jun 2005 08:42:23 BST Date: Tue, 21 Jun 2005 08:42:23 +0100 (BST) From: Rohit Gaddi Subject: index selection by query planner To: pgsql-performance@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1934434149-1119339743=:39461" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.831 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, HTML_20_30, HTML_MESSAGE X-Spam-Level: * X-Archive-Number: 200506/533 X-Sequence-Number: 13170 --0-1934434149-1119339743=:39461 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I have a table with two indices on the same column, one of which is a partial index. I would like the query planner to use the partial index whenever the query condition lies in the range of the partial index as it would yield better performance. Is there any way to enforce the ordering for the indices? How does the query planner decide which index to use when a particular query is fired? 'Explain Analyze' showed the total index being used in a situation that could be fulfiled by the partial index. Thanks, Rohit --------------------------------- How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com --0-1934434149-1119339743=:39461 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hi,
 
I have a table with two indices on the same column, one of which is a partial index. I would like the query planner to use the partial index whenever the query condition lies in the range of the partial index as it would yield better performance. Is there any way to enforce the ordering for the indices? How does the query planner decide which index to use when a particular query is fired?  'Explain Analyze' showed the total index being used in a situation that could be fulfiled by the partial index.
 
Thanks,
Rohit


How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos.
http://in.photos.yahoo.com --0-1934434149-1119339743=:39461--