Re: Sorting a query on a view ignores an index - Mailing list pgsql-performance

From Tom Lane
Subject Re: Sorting a query on a view ignores an index
Date
Msg-id 8509.1061477951@sss.pgh.pa.us
Whole thread Raw
In response to Sorting a query on a view ignores an index  (Mathieu De Zutter <mathieu@dezutter.org>)
Responses Re: Sorting a query on a view ignores an index  (Mathieu De Zutter <mathieu@dezutter.org>)
List pgsql-performance
Mathieu De Zutter <mathieu@dezutter.org> writes:
> However, i dont want the view to be presorted, but sort it in the
> queries that use the view. When I do that, the index I have on that
> field seems to be ignored. It stretches so far that, when I sort the
> view on A and sort the query on A too, the query will try to sort
> _again_ _without_ index and thus lose all performance.

This is a limitation of the 7.3 query planner.  7.4 should do better.

            regards, tom lane

pgsql-performance by date:

Previous
From: "Shridhar Daithankar"
Date:
Subject: Re: Tests
Next
From: Mathieu De Zutter
Date:
Subject: Re: Sorting a query on a view ignores an index