Please try LIMIT 1 in exists

 exists(select id from condition_document_excerpt where
condition_id=c1686.id LIMIT 1) as v1686_has_reference



--
View this message in context: 
http://postgresql.1045698.n5.nabble.com/Query-completed-in-1s-in-PG-9-1-and-700s-in-PG-9-2-tp5730899p5731021.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.


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