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

From olivier HARO
Subject Re: General performance problem!
Date
Msg-id 001901c48470$b1b92140$0c0101c0@saturne
Whole thread Raw
In response to General performance problem!  ("olivier HARO" <o.haro@en-compro.com>)
List pgsql-performance
Thanks for the tip for the index on multiple columns !  (I never do inserts
on this table so insert time doesn't matter)

Mys posgresql version is : PostgreSQL 7.2.1

Here are the results of the EXPLAIN ANALYZE you asked me to execute.


explain analyse select cp from base_aveugle where cp='69740' and effectif
between 1 and 50;
   NOTICE:  QUERY PLAN:
      Index Scan using base_aveugle_cp_eff on base_aveugle
(cost=0.00..508.69 rows=126 width=32)
      (actual time=0.27..11.56 rows=398 loops=1)
      Total runtime: 11.77 msec
   EXPLAIN

explain analyse select cp from base_aveugle where cp like '69%' and effectif
between 1 and 50 and naf like '24%' or naf like '25%';
   NOTICE:  QUERY PLAN:
   Index Scan using base_aveugle_cp_eff_naf, base_aveugle_naf on
base_aveugle  (cost=0.00..100001.89 rows=25245 width=32)
   (actual time=4.40..353.69 rows=6905 loops=1)
   Total runtime: 355.82 msec
   EXPLAIN


thx ;)


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.737 / Virus Database: 491 - Release Date: 11/08/2004


pgsql-performance by date:

Previous
From: Artimenko Igor
Date:
Subject: Postgres does not utilize indexes. Why?
Next
From: Michal Taborsky
Date:
Subject: Re: Postgres does not utilize indexes. Why?