Re: Multi-key index not beeing used - bug?

From: Tobias Brox <tobias(at)nordicbet(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tobias Brox <tobias(at)nordicbet(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Multi-key index not beeing used - bug?
Date: 2006-10-04 20:41:48
Message-ID: 20061004204148.GA24672@oppetid.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

[Tom Lane - Wed at 04:33:54PM -0400]
> > We have indices on the users_id field and the (users_id, created)-tuple.
>
> Neither of those indexes can provide the sort order the query is asking
> for.

Ah; that's understandable - the planner have two options, to do a index
traversion without any extra sorting, or to take out everything and then
sort. What I'd like postgres to do is to traverse the index and do some
sorting for every unique value of created. Maybe such a feature can be
found in future releases - like Postgres 56.3? ;-)

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Merlin Moncure 2006-10-04 21:07:24 Re: Performance Optimization for Dummies 2 - the SQL
Previous Message Tom Lane 2006-10-04 20:33:54 Re: Multi-key index not beeing used - bug?