Re: EXPLAIN output explanation requested

Поиск
Список
Период
Сортировка
От Ron Arts
Тема Re: EXPLAIN output explanation requested
Дата
Msg-id 48458489.9080908@neonova.nl
обсуждение исходный текст
Ответ на Re: EXPLAIN output explanation requested  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Ответы Re: EXPLAIN output explanation requested  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: EXPLAIN output explanation requested  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Список pgsql-novice
A. Kretschmer schreef:
> am  Tue, dem 03.06.2008, um 12:35:34 +0200 mailte A. Kretschmer folgendes:
>> I guess, you have much insert/delete or update - operations on this
>> table and no recent vacuum.
>>
>> Try to run a 'vacuum full;' and re-run your query. And, run a 'explain
>> analyse <your query>' to see the estimated costs and the real costs.
>
> Btw, run 'select relpages, reltuples from pg_class where relname='phone';
> before and after the 'vacuum full' and show us the result.
>
>
> Andreas

I did a vacuum without success, but `vacuum full` did the trick:

tium=# select relpages, reltuples from pg_class where relname='phone';
  relpages | reltuples
----------+-----------
     85876 |       658
(1 row)
tium=# vacuum full;
VACUUM
tium=# select relpages, reltuples from pg_class where relname='phone';
  relpages | reltuples
----------+-----------
        17 |       248
(1 row)

tium=# explain analyze select codec1, phonetype from phone;
                                              QUERY PLAN
-----------------------------------------------------------------------------------------------------
  Seq Scan on phone  (cost=0.00..76.77 rows=977 width=11) (actual time=0.007..0.751 rows=248 loops=1)
  Total runtime: 0.957 ms
(2 rows)

tium=#

What do those values relpages and reltuples mean?

Thanks,
Ron


--
NeoNova BV, The Netherlands
Professional internet and VoIP solutions

http://www.neonova.nl   Kruislaan 419              1098 VA Amsterdam
info: 020-5628292       servicedesk: 020-5628292   fax: 020-5628291
KvK Amsterdam 34151241

The following disclaimer applies to this email:
http://www.neonova.nl/maildisclaimer


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

Предыдущее
От: Ron Arts
Дата:
Сообщение: Re: EXPLAIN output explanation requested
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: EXPLAIN output explanation requested