Krade <kr...@krade.com> wrote:
> SELECT * FROM a WHERE comment_tsv @@ plainto_tsquery('love')
> ORDER BY timestamp DESC LIMIT 24 OFFSET 0;
 
Have you considered keeping rows "narrow" until you've identified your
24 rows?  Something like:
 
SELECT * FROM a 
  WHERE id in
    (
      SELECT id FROM a
        WHERE comment_tsv @@ plainto_tsquery('love')
        ORDER BY timestamp DESC
        LIMIT 24 OFFSET 0
    )
  ORDER BY timestamp DESC
;
 
-Kevin

-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

Reply via email to