Skip site navigation (1) Skip section navigation (2)

Fwd: Index on table when using DESC clause

From: Yves Vindevogel <yves(dot)vindevogel(at)implements(dot)be>
To: pgsql-performance(at)postgresql(dot)org
Subject: Fwd: Index on table when using DESC clause
Date: 2005-05-23 17:41:19
Message-ID: 6d31bed04ab35cbbe2df37af979d9882@implements.be (view raw or flat)
Thread:
Lists: pgsql-performance

Begin forwarded message:

> From: Yves Vindevogel <yves(dot)vindevogel(at)implements(dot)be>
> Date: Mon 23 May 2005 19:23:16 CEST
> To: pgsql-performance-owner(at)postgresql(dot)org
> Subject: Index on table when using DESC clause
>
> Hi,
>
> I have a table with multiple fields.  Two of them are documentname and 
> pages
> I have indexes on documentname and on pages, and one extra on 
> documentname + pages
>
> However, when I query my db using for instance   order by pages, 
> documentname, it is very fast.
> If I use   order by pages desc, documentname, it is not fast at all, 
> like it is not using the index properly at all.
>
> How can I avoid this ?
>
> Met vriendelijke groeten,
> Bien à vous,
> Kind regards,
>
> Yves Vindevogel
> Implements
>

Attachment: Pasted Graphic 2.tiff
Description: image/tiff (5.6 KB)
Attachment: Pasted Graphic 2.tiff
Description: image/tiff (5.6 KB)

Responses

pgsql-performance by date

Next:From: Steinar H. GundersonDate: 2005-05-23 18:03:52
Subject: Re: Fwd: Index on table when using DESC clause
Previous:From: Alex StapletonDate: 2005-05-21 17:27:18
Subject: Re: Optimizing for writes. Data integrity not critical

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group