Re: General performance problem! - Mailing list pgsql-performance

From Richard Huxton
Subject Re: General performance problem!
Date
Msg-id 4122132E.80603@archonet.com
Whole thread Raw
In response to General performance problem!  ("olivier HARO" <o.haro@en-compro.com>)
List pgsql-performance
olivier HARO wrote:
> This table contains 5 000 000 records
>
> I have a PHP application which often makes queries on this table (especially on the "cp","naf","effectif" fields)
>
> Querries are like :
>       select (distint cp) from base_aveugle where cp='201A' and effectif between 1 and 150
>       select (*) from base_aveugle where naf in ('721A','213F','421K') and cp in ('54210','21459','201A') and
effectif< 150 

We'll need to know what version of PostgreSQL you're using and also what
the output of EXPLAIN ANALYZE shows for your example queries.

--
   Richard Huxton
   Archonet Ltd

pgsql-performance by date:

Previous
From: Gaetano Mendola
Date:
Subject: Re: General performance problem!
Next
From: Artimenko Igor
Date:
Subject: Postgres does not utilize indexes. Why?