LP uses GIST indices which are slow to query compared to GIN indices

Bug #306201 reported by Stuart Bishop
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Stuart Bishop
PostgreSQL
Fix Released
Undecided
Unassigned

Bug Description

If we convert our GIST indexes used by tsearch2 to GIN, we occasionally have queries abort with the following error message:

Query requires full scan, GIN doesn't support it

As the querys are generated from user input we can't stop this entirely. For example, searching for '-foo' will almost certainly trigger the error.

Dropping the index allows the queries to work slowly. Reverting to the GIST index is currently the workaround. Our application should see a considerable performance benefit if we could use GIN indexes.

Related branches

Revision history for this message
Stuart Bishop (stub) wrote :

Launchpad can switch immediately to GIN indexes for a big speed improvement if this is fixed in PostgreSQL.

Launchpad ideally should detect if a query requires a full scan and abort the search gracefully. This would also be a work around to the edge case GIN doesn't support, and allow us to switch index types for a big speed improvement. This approach is discussed in Bug 119780.

Changed in launchpad-foundations:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Stuart Bishop (stub) wrote :

Some discussion on the pg-hackers list about this issue from two years ago:

    http://archives.postgresql.org/pgsql-hackers/2007-01/msg01581.php

The brief discussion on pgsql-general related to Launchpad:

    http://archives.postgresql.org/pgsql-general/2007-06/msg01132.php

Revision history for this message
Robert Collins (lifeless) wrote :

PG 9.something supports this

Changed in launchpad:
importance: Medium → High
Changed in postgresql:
status: New → Fix Released
tags: added: search
summary: - GIN indexes don't support full scans, causing queries to abort
+ LP uses GIST indices which are slow to querty
summary: - LP uses GIST indices which are slow to querty
+ LP uses GIST indices which are slow to query
tags: added: pg9
summary: - LP uses GIST indices which are slow to query
+ LP uses GIST indices which are slow to query compared to GIN indices
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
assignee: nobody → Stuart Bishop (stub)
tags: added: qa-needstesting
Changed in launchpad:
status: Triaged → In Progress
William Grant (wgrant)
tags: added: qa-ok
removed: qa-needstesting
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
removed: qa-ok
Changed in launchpad:
status: In Progress → Fix Committed
William Grant (wgrant)
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.