Russell Keane <Russell(dot)Keane(at)inps(dot)co(dot)uk> wrote:
> Clearly the statistics are off somehow but I really don't know
> where to start.
>
> Any help you can give me would be very much appreciated.
It would help to know your more about your hardware and PostgreSQL
configuration. The latter can probably best be communicated by
copy/paste of the results of the query on this page:
http://wiki.postgresql.org/wiki/Server_Configuration
Can you also post the EXPLAIN ANALYZE output for the slow query with
both indexes present but without the LIMIT clause?
-Kevin