[postgis-users] [GENERAL] How to improve this query?
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Tue Feb 8 03:42:10 PST 2011
On 08/02/11 11:05, Jorge Arévalo wrote:
> 2011/2/8 Stefan Keller<sfkeller at gmail.com>:
>> " Hash Cond: (TABLE_C.STR_FIELD = TABLE_B.STR_FIELD)"
>> tells me that these two longish strings are compared first.
>> Did you already try to index TABLE_C.STR_FIELD and TABLE_B.STR_FIELD
>> as hash instead btree?
>
> I thought hash indexes were discouraged over btree. Anyway, I'll test it.
Absolutely. You do not want to be using Hash Indexes these days - stick
with B-Tree. The hash refers to the method by which the executor matches
the two column fields and is not related to the underlying index type.
ATB,
Mark.
--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063
Sirius Labs: http://www.siriusit.co.uk/labs
More information about the postgis-users
mailing list