Re: bad estimates

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: kgeis(at)alum(dot)calberkeley(dot)org
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: bad estimates
Date: 2003-08-29 04:24:53
Message-ID: 20030829042453.GA5931@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Aug 28, 2003 at 21:09:00 -0700,
Ken Geis <kgeis(at)speakeasy(dot)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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Alexander Priem 2003-08-29 06:52:06 Indexing question
Previous Message scott.marlowe 2003-08-29 04:22:35 Re: opinion on RAID choice