Re: cost and actual time

Поиск
Список
Период
Сортировка
От Manfred Koizar
Тема Re: cost and actual time
Дата
Msg-id pg325v0d34dn2c03gbg0qli11rqnotf642@4ax.com
обсуждение исходный текст
Ответ на Re: cost and actual time  (Chantal Ackermann <chantal.ackermann@biomax.de>)
Ответы Re: cost and actual time  (Chantal Ackermann <chantal.ackermann@biomax.de>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: cost and actual time
Следующее
От: Barry Lind
Дата:
Сообщение: Re: [JDBC] Good performance?