pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: olivier HARO <o.haro@en-compro.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: General performance problem!
Date: Tue, 17 Aug 2004 15:16:14 +0100
Message-ID: <4122132E.80603@archonet.com> (raw)
In-Reply-To: <002901c4845e$5d1dc1c0$0c0101c0@saturne>
References: <002901c4845e$5d1dc1c0$0c0101c0@saturne>

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



view thread (6+ messages)  latest in thread

Message-ID: <4122132E.80603@archonet.com>
Permalink:  ../4122132E.80603@archonet.com/
Also on:    postgresql.org/message-id/4122132E.80603@archonet.com

 · 

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: dev@archonet.com, o.haro@en-compro.com
  Subject: Re: General performance problem!
  In-Reply-To: <4122132E.80603@archonet.com>

* 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