Re: cost and actual time - Mailing list pgsql-performance

From Manfred Koizar
Subject Re: cost and actual time
Date
Msg-id pg325v0d34dn2c03gbg0qli11rqnotf642@4ax.com
Whole thread Raw
In response to Re: cost and actual time  (Chantal Ackermann <chantal.ackermann@biomax.de>)
Responses Re: cost and actual time
List pgsql-performance
On Mon, 17 Feb 2003 11:51:56 +0100, Chantal Ackermann
<chantal.ackermann@biomax.de> wrote:
>the gene_id for 'igg' occurres 110637 times in gene_occurrences, it is
>the most frequent.

Chantal, could you try

EXPLAIN ANALYZE
SELECT tmp.disease_name, count(tmp.disease_name) AS cnt
  FROM (SELECT DISTINCT dd.disease_name, d_o.sentence_id
          FROM disease d,
               gene_occurrences g_o,
               disease_occurrences d_o
         WHERE g_o.sentence_id=d_o.sentence_id
           AND g_o.gene_id=4711
           AND d.disease_id=d_o.disease_id) AS tmp
 GROUP BY tmp.disease_name
 ORDER BY cnt DESC;

replacing 4711 by the result of
    SELECT gene_id FROM gene WHERE gene_name='igg'

and show us the plan you get?

Servus
 Manfred

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: cost and actual time
Next
From: Barry Lind
Date:
Subject: Re: [JDBC] Good performance?