| From: | Yves Vindevogel <yves(dot)vindevogel(at)implements(dot)be> |
|---|---|
| To: | pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: Fwd: Index on table when using DESC clause |
| Date: | 2005-05-23 19:02:17 |
| Message-ID: | c4e0898e4059f6d3333ee2e59fd5c788@implements.be |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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:
> 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
| Attachment | Content-Type | Size |
|---|---|---|
| Pasted Graphic 2.tiff | image/tiff | 5.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Oleg Bartunov | 2005-05-23 19:46:38 | Re: Fwd: Index on table when using DESC clause |
| Previous Message | Steinar H. Gunderson | 2005-05-23 18:03:52 | Re: Fwd: Index on table when using DESC clause |