Re: bad estimates

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: bad estimates
Дата
Msg-id 20030829042453.GA5931@wolff.to
обсуждение исходный текст
Ответ на Re: bad estimates  (Ken Geis <kgeis@speakeasy.org>)
Ответы Re: bad estimates  (Ken Geis <kgeis@speakeasy.org>)
Re: bad estimates  (Ken Geis <kgeis@speakeasy.org>)
Список pgsql-performance
On Thu, Aug 28, 2003 at 21:09:00 -0700,
  Ken Geis <kgeis@speakeasy.org> wrote:
> Bruno Wolff III wrote:
>
> I am positive!  I can send a log if you want, but I won't post it to the
> list.

Can you do a \d on the real table or is that too sensitive?

It still doesn't make sense that you have a primary key that
is a stock and its price. What happens when the stock has the
same price on two different dates? And I doubt that you are looking
for the minimum and maximum dates for which you have price data.
So it is hard to believe that the index for your primary key is the
one you need for your query.

> The arity on the data is roughly 1500 price_dates per stock_id.

Two index scans (one for min values and another for max values)
should be better than one sequential scan under those conditions.

I am calling it quits for tonight, but will check back tomorrow
to see how things turned out.

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

Предыдущее
От: Ken Geis
Дата:
Сообщение: Re: bad estimates
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: opinion on RAID choice