Re: LIMIT causes planner to do Index Scan using a less optimal index - Mailing list pgsql-performance

From Matthew Wakeling
Subject Re: LIMIT causes planner to do Index Scan using a less optimal index
Date
Msg-id alpine.DEB.2.00.1004071433080.9798@aragorn.flymine.org
Whole thread Raw
In response to Re: LIMIT causes planner to do Index Scan using a less optimal index  (Sherry.CTR.Zhu@faa.gov)
List pgsql-performance
On Wed, 7 Apr 2010, Sherry.CTR.Zhu@faa.gov wrote:
> Please just let me know if Postgres can do this kind of index or not.
>
> create index idx1 on tb1(col1, col2)
>
> Then later we can find it is useful or useless.

Have you tried it?

> Grzegorz Jaśkiewicz <gryzman@gmail.com> wrote:
>> something like this:   create index idx1 on tb1(col1, col2);
>> yup :)

For those of you who are not native English speakers, "Yup" is a synonym
for "Yes."

Matthew

--
Richards' Laws of Data Security:
 1. Don't buy a computer.
 2. If you must buy a computer, don't turn it on.

pgsql-performance by date:

Previous
From: Sherry.CTR.Zhu@faa.gov
Date:
Subject: Re: LIMIT causes planner to do Index Scan using a less optimal index
Next
From: Robert Haas
Date:
Subject: Re: query slow; strace output worrisome