Re: [HACKERS] Why is that so slow?

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Why is that so slow?
Date: 1999-03-05 05:37:38
Message-ID: 199903050537.OAA02917@srapc451.sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)
-> Index Scan using prefpidindex on prefecture (cost=2.05 size=47 width=26)

--
Tatsuo Ishii

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1999-03-05 06:57:24 Re: [INTERFACES] Foreign Keys
Previous Message Tatsuo Ishii 1999-03-05 03:50:48 Why is that so slow?