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 2D30E5285C for ; Tue, 21 Jun 2005 04:49:08 -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 88055-10 for ; Tue, 21 Jun 2005 07:48:59 +0000 (GMT) Received: from web8306.mail.in.yahoo.com (web8306.mail.in.yahoo.com [202.43.219.218]) by svr1.postgresql.org (Postfix) with SMTP id 2E5F95283D for ; Tue, 21 Jun 2005 04:48:57 -0300 (ADT) Received: (qmail 77675 invoked by uid 60001); 21 Jun 2005 07:48:55 -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=K+8rMQXCyhWfYQKhG3ayqeBRRJt0fZozX8wjLLsgZK0YXDed58c7bwCI/DYsqazXAp7FajyhmIpfwavXFSHimm2wojljhmfdkLTD0IZqKGzYo4o6takvhDoGusysT8hEErdPbFMhYtWrH0x8MMinFln2SWLkCkzo5QSvHOgtDP0= ; Message-ID: <20050621074855.77673.qmail@web8306.mail.in.yahoo.com> Received: from [203.101.103.131] by web8306.mail.in.yahoo.com via HTTP; Tue, 21 Jun 2005 08:48:50 BST Date: Tue, 21 Jun 2005 08:48:50 +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-1461443420-1119340130=:76391" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.769 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, HTML_10_20, HTML_MESSAGE X-Spam-Level: * X-Archive-Number: 200506/532 X-Sequence-Number: 13169 --0-1461443420-1119340130=:76391 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-1461443420-1119340130=:76391 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-1461443420-1119340130=:76391--