Re: General performance problem!

From: "olivier HARO" <o(dot)haro(at)en-compro(dot)com>
To: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: General performance problem!
Date: 2004-08-17 15:41:41
Message-ID: 001901c48470$b1b92140$0c0101c0@saturne
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-performance by date

  From Date Subject
Next Message Michal Taborsky 2004-08-17 15:45:34 Re: Postgres does not utilize indexes. Why?
Previous Message Artimenko Igor 2004-08-17 15:35:55 Postgres does not utilize indexes. Why?