X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id ED052D1B4F6 for ; Wed, 8 Oct 2003 14:09:45 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 68507-03 for ; Wed, 8 Oct 2003 11:08:59 -0300 (ADT) Received: from web10510.mail.yahoo.com (web10510.mail.yahoo.com [216.136.130.193]) by svr1.postgresql.org (Postfix) with SMTP id 6ED86D1B517 for ; Wed, 8 Oct 2003 11:08:55 -0300 (ADT) Message-ID: <20031008140859.21016.qmail@web10510.mail.yahoo.com> Received: from [200.55.12.27] by web10510.mail.yahoo.com via HTTP; Wed, 08 Oct 2003 09:08:59 CDT Date: Wed, 8 Oct 2003 09:08:59 -0500 (CDT) From: =?iso-8859-1?q?Adrian=20Demaestri?= Subject: planner doesn't use multicolumn index To: pgsql-performance@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-623169799-1065622139=:20008" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/200 X-Sequence-Number: 3948 --0-623169799-1065622139=:20008 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit We've a table with about 8 million rows, and we need to get rows by the value of two of its fields( the type of the fields are int2 and int4, the where condition is v.g. partido=99 and partida=123). We created a multicolumn index on that fields but the planner doesn't use it, it still use a seqscan. That fields are primary key of the table and we clusterded the table based on that index, but it still doesn't work. We also set the enviroment variable enable_seqscan to false and nathing happends. The only way the planner use it is in querys that order by the expression of the index. Any idea? thanks. Adrián --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, América Latina y el resto del Mundo. Visíta Yahoo! Noticias. --0-623169799-1065622139=:20008 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
We've a table with about 8 million rows, and we need to get rows by the value of two of its fields( the type of the fields are int2 and int4, the where condition is v.g. partido=99 and partida=123). We created a multicolumn index on that fields but the planner doesn't use it, it still use a seqscan. That fields are primary key of the table and we clusterded the table based on that index, but it still doesn't work. We also set the enviroment variable enable_seqscan to false and nathing happends. The only way the planner use it is in querys that order by the expression of the index.
Any idea?
thanks.
Adrián



Do You Yahoo!?
Todo lo que quieres saber de Estados Unidos, América Latina y el resto del Mundo.
Visíta Yahoo! Noticias.
--0-623169799-1065622139=:20008--