pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
To: Adrian Demaestri <ademaestri@yahoo.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: planner doesn't use multicolumn index
Date: Wed, 08 Oct 2003 19:57:38 +0530
Message-ID: <3F841EDA.7000207@persistent.co.in> (raw)
In-Reply-To: <20031008140859.21016.qmail@web10510.mail.yahoo.com>
References: <20031008140859.21016.qmail@web10510.mail.yahoo.com>

Adrian Demaestri wrote:

> 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.

Use partido=99::int2 and partida=123::int4

Match the data types basically..

  Shridhar




view thread (4+ messages)  latest in thread

Message-ID: <3F841EDA.7000207@persistent.co.in>
Permalink:  ../3F841EDA.7000207@persistent.co.in/
Also on:    postgresql.org/message-id/3F841EDA.7000207@persistent.co.in

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: shridhar_daithankar@persistent.co.in, ademaestri@yahoo.com
  Subject: Re: planner doesn't use multicolumn index
  In-Reply-To: <3F841EDA.7000207@persistent.co.in>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox