Re: LONG delete with LOTS of FK's

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: LONG delete with LOTS of FK's
Дата
Msg-id 25119.1367507317@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: LONG delete with LOTS of FK's  (Larry Rosenman <ler@lerctr.org>)
Ответы Re: LONG delete with LOTS of FK's  (Larry Rosenman <ler@lerctr.org>)
Re: LONG delete with LOTS of FK's  (Larry Rosenman <ler@lerctr.org>)
Список pgsql-general
Larry Rosenman <ler@lerctr.org> writes:
> Question: Do all these need to have a bare index just on the account_id
> column, or is a multicolumn index with account_id first
> sufficient for the check to be reasonably quick?

I would think that such an index would be sufficient, but you could
check for yourself by doing something like

    explain select 1 from <table> where account_id = <something>

and verifying that you get an indexscan not a seqscan, for each
dependent table.

            regards, tom lane


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

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: Re: LONG delete with LOTS of FK's
Следующее
От: Larry Rosenman
Дата:
Сообщение: Re: LONG delete with LOTS of FK's