"Hash index" vs. "b-tree index" (PostgreSQL 8.0)

От: Ying Lu
Тема: "Hash index" vs. "b-tree index" (PostgreSQL 8.0)
Дата: ,
Msg-id: 427F6853.90308@cs.concordia.ca
(см: обсуждение, исходный текст)
Ответы: Re: "Hash index" vs. "b-tree index" (PostgreSQL 8.0)  (Neil Conway)
Список: pgsql-general

Скрыть дерево обсуждения

"Hash index" vs. "b-tree index" (PostgreSQL 8.0)  (Ying Lu, )
 Re: "Hash index" vs. "b-tree index" (PostgreSQL 8.0)  (Neil Conway, )
  Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL 8.0)  (Christopher Petrilli, )
   Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Neil Conway, )
    Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  ("Jim C. Nasby", )
     Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Neil Conway, )
      Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  ("Jim C. Nasby", )
       Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Neil Conway, )
        Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Tom Lane, )
         Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Neil Conway, )
          Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Tom Lane, )
           Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Neil Conway, )
           Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Greg Stark, )
            Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Tom Lane, )
             Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Greg Stark, )
              Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Tom Lane, )
               Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Greg Stark, )
                Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Tom Lane, )
         Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  ("Jim C. Nasby", )
          Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Tom Lane, )
           Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  ("Jim C. Nasby", )
        Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  ("Jim C. Nasby", )
         Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Tom Lane, )
         Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Mischa Sandberg, )
          Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Mark Lewis, )
           Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Mischa Sandberg, )
            Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Bruce Momjian, )
             Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Mischa Sandberg, )
              Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Bruce Momjian, )
               Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Mischa Sandberg, )
             Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Neil Conway, )
              Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Bruce Momjian, )
          Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Tom Lane, )
           Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Mischa Sandberg, )
       Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Bruce Momjian, )
 Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Tom Lane, )
  Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Neil Conway, )
 Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Greg Stark, )

Greetings,

We are working on speeding up the queries by creating indexes. We have
queries with searching criteria such as "select ... where *col1='...'*".
This is a simple query with only "=" operation. As a result I setup hash
index on column "col1". While, in postgreSQL 8 doc, it is wirttern:

*Note: * Testing has shown PostgreSQL's hash indexes to perform no
better than B-tree indexes, and the index size and build time for hash
indexes is much worse. For these reasons, hash index use is presently
discouraged.

May I know for simple "=" operation query, for "Hash index" vs. "B-tree"
index, which can provide better performance please?

Thanks,
Emi


В списке pgsql-general по дате сообщения:

От: Tom Lane
Дата:
Сообщение: Re: Trigger that spawns forked process
От: Scott Marlowe
Дата:
Сообщение: Re: Clustering Database Servers