From: Manfred Koizar <mkoi-pg@aon.at>
To: Chantal Ackermann <chantal.ackermann@biomax.de>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: cost and actual time
Date: Mon, 17 Feb 2003 17:49:16 +0100
Message-ID: <pg325v0d34dn2c03gbg0qli11rqnotf642@4ax.com> (raw)
In-Reply-To: <3E50BECC.9090107@biomax.de>
References: <web-2838434@davinci.ethosmedia.com>
<3E50BECC.9090107@biomax.de>
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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: mkoi-pg@aon.at, chantal.ackermann@biomax.de, josh@agliodbs.com
Subject: Re: cost and actual time
In-Reply-To: <pg325v0d34dn2c03gbg0qli11rqnotf642@4ax.com>
References: <web-2838434@davinci.ethosmedia.com> <3E50BECC.9090107@biomax.de> <pg325v0d34dn2c03gbg0qli11rqnotf642@4ax.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