Re: [HACKERS] Why hash indexes suck

2004-06-10 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: [blink] This seems to miss out on the actual point of the thread (hash bucket size shouldn't be a disk page) in favor of an entirely unsupported sub-suggestion. Yes, I was unsure of the text myself. I have

Re: [HACKERS] Why hash indexes suck

2004-06-09 Thread Bruce Momjian
Added to TODO: * Order heap pointers on hash index pages by hash value and ctid --- Zeugswetter Andreas SB SD wrote: We could safely sort on the hash value, but I'm not sure how effective that would be,

Re: [HACKERS] Why hash indexes suck

2004-06-09 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Added to TODO: * Order heap pointers on hash index pages by hash value and ctid [blink] This seems to miss out on the actual point of the thread (hash bucket size shouldn't be a disk page) in favor of an entirely unsupported sub-suggestion.

Re: [HACKERS] Why hash indexes suck

2004-06-09 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Added to TODO: * Order heap pointers on hash index pages by hash value and ctid [blink] This seems to miss out on the actual point of the thread (hash bucket size shouldn't be a disk page) in favor of an entirely unsupported

Re: [HACKERS] Why hash indexes suck

2004-06-07 Thread Zeugswetter Andreas SB SD
We could safely sort on the hash value, but I'm not sure how effective that would be, considering that we're talking about values that already hashed into the same bucket --- there's likely not to be very many distinct hash values there. I think we can safely put that on the todo list. The

Re: [HACKERS] Why hash indexes suck

2004-06-06 Thread pgsql
Sailesh Krishnamurthy [EMAIL PROTECTED] writes: This is probably a crazy idea, but is it possible to organize the data in a page of a hash bucket as a binary tree ? Only if you want to require a hash opclass to supply ordering operators, which sort of defeats the purpose I think. Hash is

[HACKERS] Why hash indexes suck

2004-06-05 Thread Tom Lane
Dann Corbit [EMAIL PROTECTED] writes: There seems to be something seriously defective with hash indexes in old versions of PostgreSQL. They still suck; I'm not aware of any situation where I'd recommend hash over btree indexes in Postgres. I think we have fixed the hash indexes' deadlock

Re: [HACKERS] Why hash indexes suck

2004-06-05 Thread Tom Lane
Sailesh Krishnamurthy [EMAIL PROTECTED] writes: This is probably a crazy idea, but is it possible to organize the data in a page of a hash bucket as a binary tree ? Only if you want to require a hash opclass to supply ordering operators, which sort of defeats the purpose I think. Hash is only

Re: [HACKERS] Why hash indexes suck

2004-06-05 Thread Jeff Davis
On Sat, 2004-06-05 at 13:31, Tom Lane wrote: Only if you want to require a hash opclass to supply ordering operators, which sort of defeats the purpose I think. Hash is only supposed to need equality not ordering. Is it possible to assume some kind of ordering (i.e. strcmp() the binary data

Re: [HACKERS] Why hash indexes suck

2004-06-05 Thread Tom Lane
Jeff Davis [EMAIL PROTECTED] writes: On Sat, 2004-06-05 at 13:31, Tom Lane wrote: Only if you want to require a hash opclass to supply ordering operators, which sort of defeats the purpose I think. Hash is only supposed to need equality not ordering. Is it possible to assume some kind of