Re: Seqscan rather than Index

От: Frank Wiles
Тема: Re: Seqscan rather than Index
Дата: ,
Msg-id: 20041217170229.4de276a7.frank@wiles.org
(см: обсуждение, исходный текст)
Ответ на: Re: Seqscan rather than Index  ("Steinar H. Gunderson")
Ответы: Re: Seqscan rather than Index  ("Steinar H. Gunderson")
Re: Seqscan rather than Index  (Tom Lane)
Список: pgsql-performance

Скрыть дерево обсуждения

Seqscan rather than Index  (Jon Anderson, )
 Re: Seqscan rather than Index  (Tom Lane, )
 Re: Seqscan rather than Index  (David Brown, )
  Re: Seqscan rather than Index  (Richard Huxton, )
   Re: Seqscan rather than Index  (Greg Stark, )
    Re: Seqscan rather than Index  (Tom Lane, )
     Re: Seqscan rather than Index  (Greg Stark, )
      Re: Seqscan rather than Index  (Tom Lane, )
    Re: Seqscan rather than Index  ("Steinar H. Gunderson", )
     Re: Seqscan rather than Index  ("Steinar H. Gunderson", )
      Re: Seqscan rather than Index  (Frank Wiles, )
       Re: Seqscan rather than Index  ("Steinar H. Gunderson", )
       Re: Seqscan rather than Index  (Tom Lane, )
        Re: Seqscan rather than Index  (Frank Wiles, )
     Re: Seqscan rather than Index  (Bruno Wolff III, )
      Re: Seqscan rather than Index  ("Steinar H. Gunderson", )

On Fri, 17 Dec 2004 23:09:07 +0100
"Steinar H. Gunderson" <> wrote:

> On Fri, Dec 17, 2004 at 10:56:27PM +0100, Steinar H. Gunderson wrote:
> > I'm a bit unsure -- should counting ~3 million rows (no OIDs, PG
> > 7.4, everything in cache, 32-byte rows) take ~3500ms on an Athlon 64
> > 2800+?
>
> (I realize I was a bit unclear here. This is a completely separate
> case, not related to the original poster -- I was just wondering if
> what I'm seeing is normal or not.)

  It depends more on your disk IO than the processor.  Counting isn't
  processor intensive, but reading through the entire table on disk
  is.  I've also seen a huge difference between select count(*) and
  select count(1) in older versions, haven't tried it on a recent
  version however.

 ---------------------------------
   Frank Wiles <>
   http://www.wiles.org
 ---------------------------------



В списке pgsql-performance по дате сообщения:

От: Tom Lane
Дата:
Сообщение: Re: Seqscan rather than Index
От: John A Meinel
Дата:
Сообщение: Re: Improve performance of query