Re: Help understand why DELETE is so slow

Поиск
Список
Период
Сортировка
От Ping Yao
Тема Re: Help understand why DELETE is so slow
Дата
Msg-id CAEBRQisA2Ka+nLjVKR0_7MuEX4YcO32u+SUdchS1kF5z+HhpAg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Help understand why DELETE is so slow  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: Help understand why DELETE is so slow
Re: Help understand why DELETE is so slow
Список pgsql-general

Hi Merlin,

Thank you for the comment. I think we do. What I found odd here is the Query Plan (with analyze) clearly shows the actual execution to be very quick, that's why I don't think it's an index problem. What do you think?

Ping

--

Pook-Ping Yao (He/Him)

Chief Technology Officer and co-Founder

Optigo Networks Inc.

+1-604-897-7464 | ping@optigo.net


This email, including any files attached hereto, may contain privileged or confidential information and is only for the intended addressee(s). If this email was sent to you in error, this does not constitute a waiver by Optigo Networks Inc. and we request that you kindly delete the email and notify the sender. Unauthorized use of this email is prohibited.



On Mon, Dec 4, 2023 at 1:40 PM Merlin Moncure <mmoncure@gmail.com> wrote:


On Fri, Dec 1, 2023 at 11:48 AM Ping Yao <ping@optigo.net> wrote:
Hello All. 

First timer here, long time user though. Thank you in advance.

Can someone help me understand why my simple DELETE query is so slow to run?

Not familiar with citus to diagnose any citus issues.  Having said that, can you confirm that  all tables that have a foreign key reference to this table have an index on the field referencing?

For example, if you have a table customer, with a column 'customer_id', a  table 'customer_employee' might refer to the customer table if it has 'customer_id REFERENCES customer', which would be very slow with deletes on customer.  that may not be happening here with the citus stuff, hard to tell.  Something to rule out though.

merlin

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Help understand why DELETE is so slow
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Help understand why DELETE is so slow