Begin forwarded message:

From: Yves Vindevogel <[EMAIL PROTECTED]>
Date: Mon 23 May 2005 19:23:16 CEST
To: [EMAIL PROTECTED]
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

<<inline: Pasted Graphic 2.tiff>>



Mail: [EMAIL PROTECTED] - Mobile: +32 (478) 80 82 91

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

Web: http://www.implements.be
<x-tad-smaller>
First they ignore you. Then they laugh at you. Then they fight you. Then you win.
Mahatma Ghandi.
</x-tad-smaller>
Met vriendelijke groeten,
Bien vous,
Kind regards,

Yves Vindevogel
Implements

<<inline: Pasted Graphic 2.tiff>>



Mail: [EMAIL PROTECTED] - Mobile: +32 (478) 80 82 91

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

Web: http://www.implements.be
<x-tad-smaller>
First they ignore you. Then they laugh at you. Then they fight you. Then you win.
Mahatma Ghandi.</x-tad-smaller>

---------------------------(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

Reply via email to