Re: btree index and max()
От | Bruce Momjian |
---|---|
Тема | Re: btree index and max() |
Дата | |
Msg-id | 200010020432.AAA17819@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: btree index and max() (efinley@efinley.com (Elliot Finley)) |
Список | pgsql-general |
> >By the way, I didn't find many comments about the pros and > >cons of btree/hash indexes in the docs, nor in Bruce's book... > > If I remember my data-structures (from way back when) correctly then: > > hash indexes are only good for very fast single row lookups. > > isam indexes are good for range lookups, but the implementations that > I've seen of isam indexes doesn't allow for dynamic index expanding. > > btree is good for both. btree won't be quite as fast as a hash for a > single row lookup, but still very fast. btree won't (if I remember > correctly) be quite as fast as an isam for a range lookup, but still > very fast. Also, btree allows for dynamic index expansion. Sorry to be replying to late. First, I did not mention btree vs. hash in my book because we have not seen any empirical evidence that hash is faster than btree in PostgreSQL. Also, I wanted simplicity, so I did not get into the issue. As far as ISAM, yes, I do miss its absense. The best we have now is btree combined with the CLUSTER command. Since ISAM is not self-optimizing, having to run CLUSTER on a btree is similar to having to recreate the ISAM every so often. Not sure what gain we would get by having a native ISAM vs our current btree/CLUSTER capability. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
В списке pgsql-general по дате отправления: