Sam Mason wrote:
> 
> Wouldn't this be "lower(value) = lower(?)" ?
> 

Yes, I use it as "lower(value) = lower(?)", I typed inaccurate example.


Sam Mason wrote:
> 
> So each query is taking approx 300ms?  How much data does each one
> return?
> 

No more than 1000 rows.


Sam Mason wrote:
> 
> How about combining all 1000 selects into one?
> 

I can't combine these selects into one, I need to run them one after
another.


Grzegorz Jaśkiewicz wrote:
> 
> show us explain select * ....
> 

"Bitmap Heap Scan on bn_stringvalue v  (cost=228.40..8688.70 rows=2172
width=90) (actual time=1129.767..1781.403 rows=104 loops=1)"
"  Recheck Cond: (lower((value)::text) = 'esr'::text)"
"  ->  Bitmap Index Scan on idx_stringv  (cost=0.00..227.86 rows=2172
width=0) (actual time=1107.974..1107.974 rows=104 loops=1)"
"        Index Cond: (lower((value)::text) = 'esr'::text)"
"Total runtime: 1781.566 ms"

Thanks
-- 
View this message in context: 
http://old.nabble.com/Slow-select-tp26810673p26821568.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Reply via email to