Comment 1 for bug 1476429

Revision history for this message
William Grant (wgrant) wrote : Re: Reports use unoptimizable indexes

I don't think it's quite that easy. The latter plan is faster in this case because the most recent oops_oops rows for those prefixes are quite old, which isn't the normal situation. Better would be to convince postgres to use an oops_oops(prefix_id, date) index, which would perform adequately in all cases.

Can we get an EXPLAIN ANALYZE from the first query? Or, better, a dump of the DB.