Re: Fwd: Index on table when using DESC clause
От | Yves Vindevogel |
---|---|
Тема | Re: Fwd: Index on table when using DESC clause |
Дата | |
Msg-id | c4e0898e4059f6d3333ee2e59fd5c788@implements.be обсуждение исходный текст |
Ответ на | Re: Fwd: Index on table when using DESC clause ("Steinar H. Gunderson" <sgunderson@bigfoot.com>) |
Ответы |
Re: Fwd: Index on table when using DESC clause
|
Список | pgsql-performance |
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: <excerpt>On Mon, May 23, 2005 at 07:41:19PM +0200, Yves Vindevogel wrote: <excerpt>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. </excerpt> 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 </excerpt>Met vriendelijke groeten, Bien à vous, Kind regards, <bold>Yves Vindevogel</bold> <bold>Implements</bold> <smaller> </smaller>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 <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.
Вложения
В списке pgsql-performance по дате отправления: