Re: long deletes :( Pls help

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: long deletes :( Pls help
Дата
Msg-id 20327.1074566316@sss.pgh.pa.us
обсуждение исходный текст
Ответ на long deletes :( Pls help  (Noel <noel.faux@med.monash.edu.au>)
Ответы Re: long deletes :( Pls help  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Noel <noel.faux@med.monash.edu.au> writes:
> I'm trying to delete from a table which has 42Mill rows, using a foreign
> key, which is index.
> The delete has been going three days now :( and is really frustrating.

It sounds like you're getting a really bad plan for the queries
triggered by the foreign key constraints.  One thing to make sure
of is that the datatype of the referenced and referencing columns
are the same in each foreign key relationship.  Also check that the
planner statistics are reasonably up to date (pg_class.relpages and
pg_class.reltuples should be in the vicinity of reality, at least).

            regards, tom lane

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

Предыдущее
От: Noel
Дата:
Сообщение: Re: long deletes :( Pls help
Следующее
От: Tom Lane
Дата:
Сообщение: Re: long deletes :( Pls help