Re: cost and actual time

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: Chantal Ackermann <chantal(dot)ackermann(at)biomax(dot)de>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: cost and actual time
Date: 2003-02-17 16:49:16
Message-ID: pg325v0d34dn2c03gbg0qli11rqnotf642@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, 17 Feb 2003 11:51:56 +0100, Chantal Ackermann
<chantal(dot)ackermann(at)biomax(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Barry Lind 2003-02-17 17:50:26 Re: Good performance?
Previous Message Tom Lane 2003-02-17 16:21:56 Re: cost and actual time