Re: Should I keep INDEX on the table?

Поиск
Список
Период
Сортировка
От Oliver Fromme
Тема Re: Should I keep INDEX on the table?
Дата
Msg-id 200405141245.i4ECjtnj040234@lurza.secnetix.de
обсуждение исходный текст
Ответ на Should I keep INDEX on the table?  ("Rajan Bhide" <rbhide@nulinkinc.com>)
Список pgsql-novice
Hello,

Rajan Bhide wrote:
 > I am having a table with UNIQUE constraints defined on three columns.
 > Also I have UNIQUE user defined INDEX with the same columns on the
 > table.

I think that is redundant.  You can easily verify that by
dropping the index and then check with EXPLAIN if anything
has changed with regards to index usage.

 > The problem on removing the index is that my table has almost 2M
 > transtions in approx ~4 Hours and I need to perform external reindexing
 > (DROP and CREATE INDEX) every 2 Hours to reclaim the dead space left
 > behind by the deleted rows.

Uhm, maybe I'm completely misunderstanding you here, but
I think that's the job of VACUUM.  There should not be a
need to drop and re-create the index for that purpose.

Best regards
   Oliver Fromme

--
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"In My Egoistical Opinion, most people's C programs should be indented
six feet downward and covered with dirt."
        -- Blair P. Houghton

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

Предыдущее
От: "Rajan Bhide"
Дата:
Сообщение: Re: Should I keep INDEX on the table?
Следующее
От: Ian Pilcher
Дата:
Сообщение: "Procedure" or deferrable check constraint?