Re: having indexes when clearing tables

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: having indexes when clearing tables
Дата
Msg-id 20060712034605.GA29122@wolff.to
обсуждение исходный текст
Ответ на having indexes when clearing tables  ("nuno" <wegein@gmail.com>)
Список pgsql-general
On Sun, Jul 09, 2006 at 20:35:39 -0700,
  nuno <wegein@gmail.com> wrote:
> hi there.
>
> i'm trying to clear data in a table but somehow it takes way too much
> time than i once expected (i'm using the formal 'delete from xxx' type
> of query.).
>
> this table's got several foreign keys and i suspect that is why it
> takes longer than expected.

If there are foreign keys referencing the table you are deleting from, then
it can be very benificial to have indexes on those tables. Having an index
on the table you are deleting from isn't useful when deleting all of the rows
in the table.

>
> my question is that
> would having indexes increase query performance when clearing tables?
> or could anyone suggest me any ways to increase performance of the
> query in such cases?
>
> thanks very much.
>
> regards, nuno
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>                http://archives.postgresql.org

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: doesn't recognize "!=-" (not equal to a negative value)
Следующее
От: Ken Johanson
Дата:
Сообщение: 8.2 Beta ETA