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

From Sherry.CTR.Zhu@faa.gov
Subject Re: LIMIT causes planner to do Index Scan using a less optimal index
Date
Msg-id OFB0E54E57.8291629B-ON852576FE.0048251D-852576FE.0048332D@faa.gov
Whole thread Raw
In response to Re: LIMIT causes planner to do Index Scan using a less optimal index  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
Responses Re: LIMIT causes planner to do Index Scan using a less optimal index
List pgsql-performance

Do you mean one index on two columns?

something like this:   create index idx1 on tb1(col1, col2);

Thanks much!

Xuefeng Zhu (Sherry)
Crown Consulting Inc. -- Oracle DBA
AIM Lab Data Team
(703) 925-3192



Grzegorz Jaśkiewicz <gryzman@gmail.com>

04/07/2010 08:51 AM

To
Sherry CTR Zhu/AWA/CNTR/FAA@FAA
cc
Joel Jacobson <joel@gluefinance.com>, pgsql-performance@postgresql.org, Robert Haas <robertmhaas@gmail.com>
Subject
Re: [PERFORM] LIMIT causes planner to do Index Scan using a less         optimal index







On Wed, Apr 7, 2010 at 1:20 PM, <Sherry.CTR.Zhu@faa.gov> wrote:

Guys,


  Thanks for trying and opening your mind.  

  If you want to know how Oracle addressed this issue, here it is:  index on two columns.  I remember that they told me in the training postgres has no this kind of index, can someone clarify?



lies. postgresql allows you indices on multiple columns. What it does not have, is index on multiple tables.



--
GJ

pgsql-performance by date:

Previous
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: LIMIT causes planner to do Index Scan using a less optimal index
Next
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: LIMIT causes planner to do Index Scan using a less optimal index