Re: [GENERAL] Fast join

From: Leon <leon(at)udmnet(dot)ru>
To: "'pgsql-general(at)hub(dot)org'" <pgsql-general(at)hub(dot)org>
Subject: Re: [GENERAL] Fast join
Date: 1999-06-29 17:26:06
Message-ID: 377901AE.CCB20316@udmnet.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bruce Momjian wrote:

> > -> Index Scan using gindex on btable (cost=2.05 rows=1 width=4)
> > -> Hash (cost=399.00 rows=10000 width=4)
> > -> Seq Scan on btable (cost=399.00 rows=10000 width=4)
> > -------------
>
> You can't use in index here because an IN is not selective, or if it is,
> there is way for the optimizer to know this.

Ok. It seems that statistics which is within optimizer's reach is quite
poor, so optimizer can't always make sane predictions. And, I am
afraid, improving statistics gathering will require major rewrite of code.

So there should at least be some way to give hints to optimizer,
shouldn't it?

--
Leon.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 1999-06-29 17:33:46 Re: [GENERAL] Fast join
Previous Message ralli 1999-06-29 17:14:09 (no subject)