Re: Performance question

Поиск
Список
Период
Сортировка
От Tille, Andreas
Тема Re: Performance question
Дата
Msg-id Pine.LNX.4.33.0109101427550.4709-100000@wr-linux02.rki.ivbb.bund.de
обсуждение исходный текст
Ответ на Re: Performance question  (<Herbert.Liechti@thinx.ch>)
Ответы Re: Performance question
Re: Performance question
Re: Performance question
Список pgsql-general
On Mon, 10 Sep 2001 Herbert.Liechti@thinx.ch wrote:

> Use explain. Explain tells you the query plan of the optimizer.
>
> explain SELECT .....;
Thanks I just found the thread "Index usage question" and tried to make
some profit from it:

explain SELECT Hauptdaten_Fall.MeldeKategorie, Count(Hauptdaten_Fall.ID) AS Anz FROM Hauptdaten_Fall WHERE
(((Hauptdaten_Fall.IstAktuell)=20))GROUP BY Hauptdaten_Fall.MeldeKategorie ORDER BY Hauptdaten_Fall.MeldeKategorie; 

NOTICE:  QUERY PLAN:

Aggregate  (cost=35267.33..36154.62 rows=17746 width=16)
  ->  Group  (cost=35267.33..35710.98 rows=177458 width=16)
        ->  Sort  (cost=35267.33..35267.33 rows=177458 width=16)
              ->  Seq Scan on hauptdaten_fall  (cost=0.00..15024.12 rows=177458 width=16)


Now I tried

Vacuum analyze;

but nothing changed :-(

Aggregate  (cost=35267.33..36154.62 rows=17746 width=16)
  ->  Group  (cost=35267.33..35710.98 rows=177458 width=16)
        ->  Sort  (cost=35267.33..35267.33 rows=177458 width=16)
              ->  Seq Scan on hauptdaten_fall  (cost=0.00..15024.12 rows=177458 width=16)

I have nearly no experience with query optimizing but the gread difference
in speed tells me that something is wrong here.  There were some hints in
the "Index usage question" thread about some fields which might be interpreted
as strings.  Could this be a reason and how to check this?

Kind regards

       Andreas.

В списке pgsql-general по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Re: Performance question
Следующее
От: Einar Karttunen
Дата:
Сообщение: Re: Performance question