From: Yves Vindevogel <yves.vindevogel@implements.be>
To: pgsql-performance@postgresql.org
Subject: Re: Fwd: Index on table when using DESC clause
Date: Mon, 23 May 2005 21:02:17 +0200
Message-ID: <c4e0898e4059f6d3333ee2e59fd5c788@implements.be> (raw)
In-Reply-To: <20050523180352.GA23486@uio.no>
References: <6d31bed04ab35cbbe2df37af979d9882@implements.be>
<20050523180352.GA23486@uio.no>
I tried that, but
create index ixTest on table1 (pages desc, documentname)
gives me a syntax error
On 23 May 2005, at 20:03, Steinar H. Gunderson wrote:
> On Mon, May 23, 2005 at 07:41:19PM +0200, Yves Vindevogel wrote:
>> 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.
>
> Make an index on "pages desc, documentname asc".
>
> /* Steinar */
> --
> Homepage: http://www.sesse.net/
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if
> your
> joining column's datatypes do not match
>
>
Met vriendelijke groeten,
Bien à vous,
Kind regards,
Yves Vindevogel
Implements
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.
Attachments:Pasted Graphic 2.tiff (image/tiff, 5.6K) downloadview image
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: yves.vindevogel@implements.be
Subject: Re: Fwd: Index on table when using DESC clause
In-Reply-To: <c4e0898e4059f6d3333ee2e59fd5c788@implements.be>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox