Re: index / sequential scan problem

От: Dennis Björklund
Тема: Re: index / sequential scan problem
Дата: ,
Msg-id: Pine.LNX.4.44.0307180723040.4146-100000@zigo.dhs.org
(см: обсуждение, исходный текст)
Ответ на: Re: index / sequential scan problem  (Fabian Kreitner)
Ответы: Re: index / sequential scan problem  (Tom Lane)
Список: pgsql-performance

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

index / sequential scan problem  (Fabian Kreitner, )
 Re: index / sequential scan problem  ("Shridhar Daithankar", )
  Re: index / sequential scan problem  (Fabian Kreitner, )
   Re: index / sequential scan problem  ("Shridhar Daithankar", )
 Re: index / sequential scan problem  (Paul Thomas, )
  Re: index / sequential scan problem  (Fabian Kreitner, )
   Re: index / sequential scan problem  (Paul Thomas, )
    Re: index / sequential scan problem  (Fabian Kreitner, )
     Re: index / sequential scan problem  ("Shridhar Daithankar", )
     Re: index / sequential scan problem  (Jord Tanner, )
     Re: index / sequential scan problem  (Paul Thomas, )
      Re: index / sequential scan problem  (Tom Lane, )
   Re: index / sequential scan problem  (Tom Lane, )
    Re: index / sequential scan problem  (Fabian Kreitner, )
     Re: index / sequential scan problem  (Fabian Kreitner, )
      Re: index / sequential scan problem  (Dennis Björklund, )
       Re: index / sequential scan problem  (Tom Lane, )
        Re: index / sequential scan problem  ("scott.marlowe", )
        Re: index / sequential scan problem  (Dennis Björklund, )

On Fri, 18 Jul 2003, Fabian Kreitner wrote:

> Adjusting the cpu_tuple_cost to 0.042 got the planner to choose the index.

Doesn't sound very good and it will most likely make other queries slower.
You could always turn off sequential scan before that query and turn it on
after.

> Anything I need to consider when raising it to such "high" values?

You could fill the table with more data and it will probably come to a
point where it will stop using the seq. scan.

You could of course also change pg itself so it calculates a better
estimate.

--
/Dennis



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

От: Ron Johnson
Дата:
Сообщение: Re: Hardware performance
От: Andrew Sullivan
Дата:
Сообщение: Re: Clearing rows periodically