Re: LIMIT causes planner to do Index Scan using a less optimal index

From: Matthew Wakeling <matthew(at)flymine(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: LIMIT causes planner to do Index Scan using a less optimal index
Date: 2010-04-07 13:36:44
Message-ID: alpine.DEB.2.00.1004071433080.9798@aragorn.flymine.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, 7 Apr 2010, Sherry(dot)CTR(dot)Zhu(at)faa(dot)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(at)gmail(dot)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.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Joel Jacobson 2010-04-07 15:52:30 Re: LIMIT causes planner to do Index Scan using a less optimal index
Previous Message Sherry.CTR.Zhu 2010-04-07 13:22:51 Re: LIMIT causes planner to do Index Scan using a less optimal index