Re: Interpreting statistics collector output

Поиск
Список
Период
Сортировка
От Decibel!
Тема Re: Interpreting statistics collector output
Дата
Msg-id 20070815155227.GF54135@nasby.net
обсуждение исходный текст
Ответ на Re: Interpreting statistics collector output  (Steve Madsen <steve@lightyearsoftware.com>)
Ответы Re: Interpreting statistics collector output  (Steve Madsen <steve@lightyearsoftware.com>)
Список pgsql-general
On Thu, Aug 09, 2007 at 09:14:55PM -0400, Steve Madsen wrote:
> On Aug 8, 2007, at 6:08 PM, Decibel! wrote:
> >Something else I like to look at is pg_stat_all_tables seq_scan and
> >seq_tup_read. If seq_scan is a large number and seq_tup_read/
> >seq_scan is
> >also large, that indicates that you could use an index on that table.
>
> If seq_tup_read / seq_scan is large relative to the number of rows in
> the table, wouldn't that imply that those sequential scans are often
> returning most of the rows in the table?  In that case, would an
> index help much or is a sequential scan the expected result?

I can't really think of a case where a seqscan wouldn't return all the
rows in the table... that's what it's meant to do.

What I was driving at by looking at seq_tup_read is that a small table
isn't going to use indexes anyway, so for the small tables it's
generally not worth worrying about indexes. If you wanted to be more
accurate you could look at reltuples or maybe relpages in pg_class
instead.
--
Decibel!, aka Jim Nasby                        decibel@decibel.org
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)

Вложения

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

Предыдущее
От: Erik Jones
Дата:
Сообщение: Re: is this trigger safe and efective? - locking (caching via triiggers)
Следующее
От: Andrew Edson
Дата:
Сообщение: Re: Select time jump after adding filter; please help me figure out what I'm doing wrong.