Oh Wunder:
Code:
myDB=# explain analyse select
myDB-# T."textkey"
myDB-# from myDB."TX_TEXTKEYS" As T
myDB-# where LOWER(T."textkey") >= 'f02a%'
myDB-# ;
QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------------
Bitmap Heap Scan on "TX_TEXTKEYS" t (cost=1292.70..25558.46 rows=23739 width=70) (actual time=55.826..262.766 rows=61767 loops=1)
Recheck Cond: (lower((textkey)::text) >= 'f02a%'::text)
-> Bitmap Index Scan on idx_textkey (cost=0.00..1286.76 rows=23739 width=0) (actual time=49.386..49.386 rows=61767 loops=1)
Index Cond: (lower((textkey)::text) >= 'f02a%'::text)
Total runtime: 303.985 ms - find ich angemessen ..
(5 Zeilen) Nochmal zum Vergleich:
Code:
myDB=# explain analyse select
myDB-# T."textkey"
myDB-# from archiv9."TX_TEXTKEYS" As T
myDB-# where LOWER(T."textkey") like 'f02a%';
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------
Seq Scan on "TX_TEXTKEYS" t (cost=100000000.00..100038039.06 rows=1 width=70) (actual time=81.655..3318.712 rows=10 loops=1)
Filter: (lower((textkey)::text) ~~ 'f02a%'::text)
Total runtime: 3318.771 ms :mad:
(3 Zeilen)
Gruß & Dank
Steffen
Lesezeichen