[
https://issues.apache.org/jira/browse/CONNECTORS-1090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14192026#comment-14192026
]
Karl Wright commented on CONNECTORS-1090:
-----------------------------------------
I'm not seeing any sign from postgresql that it is using the correct index and
scanning it in index order for the stuffer query.
Here's what the 8.3 documentation says:
{code}
The planner will consider satisfying an ORDER BY specification either by
scanning any available index that matches the specification, or by scanning the
table in physical order and doing an explicit sort. For a query that requires
scanning a large fraction of the table, the explicit sort is likely to be
faster because it requires less disk I/O due to a better-ordered access
pattern. Indexes are more useful when only a few rows need be fetched. An
important special case is ORDER BY in combination with LIMIT n: an explicit
sort will have to process all the data to identify the first n rows, but if
there is an index matching the ORDER BY then the first n rows can be retrieved
directly, without scanning the remainder at all.
{code}
The intent was to combine ORDER BY with LIMIT, so it matches the case in
question perfectly. I don't understand why this isn't reading from the index
in almost all cases.
> More PostgreSQL performance improvements
> ----------------------------------------
>
> Key: CONNECTORS-1090
> URL: https://issues.apache.org/jira/browse/CONNECTORS-1090
> Project: ManifoldCF
> Issue Type: Improvement
> Components: Framework core
> Affects Versions: Manifold 1.7.1
> Reporter: Karl Wright
> Assignee: Karl Wright
> Fix For: ManifoldCF 1.8, ManifoldCF 2.0
>
> Attachments: CONNECTORS-1090.patch
>
>
> More performance improvements may be possible.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)