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 mysel

Re: [HACKERS] Why hash indexes suck

2004-06-09 Thread Tom Lane
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 changed it to: >

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 > unsu

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
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, c

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. Th

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. H

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 k

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
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 on

Re: [HACKERS] Why hash indexes suck

2004-06-05 Thread Sailesh Krishnamurthy
> "Tom" == Tom Lane <[EMAIL PROTECTED]> writes: Tom> This means that if you have only one or a few items per Tom> bucket, the information density is awful, and you lose big on Tom> I/O requirements compared to a btree index. On the other Tom> hand, if you have enough items per

[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