Re: index use again and again

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: holger(at)marzen(dot)de
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: index use again and again
Date: 2002-02-12 15:54:35
Message-ID: 21796.1013529275@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Holger Marzen <holger(at)marzen(dot)de> writes:
> You're right. When the result is small, the index is used. When the
> number of rows is a little bit higher and postgres uses a table scan,
> the query is much slower. The table is not very unordered. Can I force
> postgres to raise the limit where it starts scanning the whole table?

Not directly. There is code in 7.2 to try to take account of the
effects of table ordering, but it probably needs to be improved.
See cost_index in costsize.c if you are interested.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Masaru Sugawara 2002-02-12 16:43:31 Re: Optimizing nested loops in the query plan
Previous Message Greg Copeland 2002-02-12 15:54:04 Re: [GENERAL] Feature enhancement request : use of libgda in