manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wright (JIRA)" <>
Subject [jira] [Commented] (CONNECTORS-1090) More PostgreSQL performance improvements
Date Fri, 31 Oct 2014 16:38:35 GMT


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:

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.

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:
>             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

View raw message