Re: Deleting takes days, should I add some index?

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: Deleting takes days, should I add some index?
Дата
Msg-id CAECtzeX8THbt4xQ1KaPS8-PmacanWBb_==6msk95KLuynCk2-g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Deleting takes days, should I add some index?  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-general
Le ven. 27 nov. 2020 à 16:05, Alvaro Herrera <alvherre@alvh.no-ip.org> a écrit :
On 2020-Nov-27, Alexander Farber wrote:

> Referenced by:
>     TABLE "words_chat" CONSTRAINT "words_chat_gid_fkey" FOREIGN KEY (gid)
> REFERENCES words_games(gid) ON DELETE CASCADE
>     TABLE "words_moves" CONSTRAINT "words_moves_gid_fkey" FOREIGN KEY (gid)
> REFERENCES words_games(gid) ON DELETE CASCADE
>     TABLE "words_scores" CONSTRAINT "words_scores_gid_fkey" FOREIGN KEY
> (gid) REFERENCES words_games(gid) ON DELETE CASCADE

Make sure you have indexes on the gid columns of these tables.  Delete
needs to scan them in order to find the rows that are cascaded to.


An index on words_games(finished) and words_moves(played) would help too.


--
Guillaume.

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: How to debug authentication issues in Postgres
Следующее
От: Hemil Ruparel
Дата:
Сообщение: Re: How to debug authentication issues in Postgres