Re: Index

Поиск
Список
Период
Сортировка
От Holger Jakobs
Тема Re: Index
Дата
Msg-id d6fb9d13-c682-cb87-804c-fd8a0ed50c84@jakobs.com
обсуждение исходный текст
Ответ на Index  (Rajesh Kumar <rajeshkumar.dba09@gmail.com>)
Ответы Re: Index
Список pgsql-admin
Am 10.03.24 um 12:19 schrieb Rajesh Kumar:
> Hi ,
>
> I have a table where size is increasing daily. In that table only 
> inserts and deletes happens. This table is referencing 15 other 
> tables. We have given delete cascade, so if a row is deleted in parent 
> table,  the matching records will also be deleted in those child tables.
>
> It is taking lot of time to delete. So, I am planning to create index 
> on those child tables.
>
> My question is, apart from inserts, I am only going to delete records 
> from those tables. How index improves performance for deleting 
> records? How index is affected or how to do index management in this case?

Hi,

Since every single row which is going to be deleted in the child tables 
has to be found, an index can be of great help here.

Actually, in most (not all!) cases an index on foreign key columns makes 
sense.

Regards,

Holger

-- 
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012


Вложения

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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Index
Следующее
От: Rajesh Kumar
Дата:
Сообщение: Re: Index