Re: [HACKERS] Why is that so slow?

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: [HACKERS] Why is that so slow?
Дата
Msg-id 199903050537.OAA02917@srapc451.sra.co.jp
обсуждение исходный текст
Ответ на Why is that so slow?  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Ответы Re: [HACKERS] Why is that so slow?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I got a good suggestion from Hiroshi. The conclusion is:

>    pid int2,        -- has an btree index

This is bad. I had defined a btree index on pid and it has 2000
duplicate entries in average! After I removed the index, the query
runs unbelievably fast! Now explain shows:

Nested Loop  (cost=933.82 size=1 width=100) ->  Index Scan using cityindex on postal  (cost=931.77 size=1 width=74) ->
IndexScan using prefpidindex on prefecture  (cost=2.05 size=47 width=26)
 

--
Tatsuo Ishii


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Why is that so slow?
Следующее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [INTERFACES] Foreign Keys