View not using index - Mailing list pgsql-performance

From Yves Vindevogel
Subject View not using index
Date
Msg-id 9e1745a6fe1ae29c6f1c824128871d36@implements.be
Whole thread Raw
Responses Re: View not using index
List pgsql-performance
Hi,


I have a view that has something like this:   select x, y, z from tbl
order by x, y

I have created a special index on x + y

I have run analyze


Still, when I use explain, pg says it will first sort my tables
instead of using my index

How is that possible ?


When I do  explain select x,y,z from tbl order by x, y,   it works
like I want it to work



Met vriendelijke groeten,

Bien à vous,

Kind regards,


<bold>Yves Vindevogel</bold>

<bold>Implements</bold>

<smaller>

</smaller>Hi,

I have a view that has something like this:   select x, y, z from tbl
order by x, y
I have created a special index on x + y
I have run analyze

Still, when I use explain, pg says it will first sort my tables instead
of using my index
How is that possible ?

When I do  explain select x,y,z from tbl order by x, y,   it works like
I want it to work


Met vriendelijke groeten,
Bien à vous,
Kind regards,

Yves Vindevogel
Implements

<smaller>


Mail: yves.vindevogel@implements.be  - Mobile: +32 (478) 80 82 91


Kempische Steenweg 206 - 3500 Hasselt - Tel-Fax: +32 (11) 43 55 76


Web: http://www.implements.be

<italic><x-tad-smaller>

First they ignore you.  Then they laugh at you.  Then they fight you.
Then you win.

Mahatma Ghandi.</x-tad-smaller></italic></smaller>


Mail: yves.vindevogel@implements.be  - Mobile: +32 (478) 80 82 91

Kempische Steenweg 206 - 3500 Hasselt - Tel-Fax: +32 (11) 43 55 76

Web: http://www.implements.be

First they ignore you.  Then they laugh at you.  Then they fight you.
Then you win.
Mahatma Ghandi.

Attachment

pgsql-performance by date:

Previous
From: Madison Kelly
Date:
Subject: Re: Index ot being used
Next
From: Russell Smith
Date:
Subject: Re: View not using index