Jonathan Tse <dev@tsez.net> writes:
> It is good. However, if I execute the following query:
> select * from t_post where ownerid = 2
> order by t_stamp
> The query planner doesn't use the index for sorting.
Try "order by ownerid, t_stamp".
Postgres 8.1 will recognize that the where clause makes it OK to
consider the ORDER BY as matching the index order, but existing
releases do not know that.
regards, tom lane