Version:
-----------------------------------------------------------------------------------------------
PostgreSQL 9.1.14 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.7.2-5) 4.7.2, 64-bit
Query Plan
http://explain.depesz.com/s/4s37
Normally, this query takes around 200-300 ms to execute.
However when several queries are run concurrently, query performance drops to 30-60 seconds.