Re: Slow delete

Поиск
Список
Период
Сортировка
От Colin Gillespie
Тема Re: Slow delete
Дата
Msg-id 20DA376D0C991745A4D5249F7BCD7A2521B4F7@largo.campus.ncl.ac.uk
обсуждение исходный текст
Ответ на Slow delete  ("Colin Gillespie" <C.Gillespie@newcastle.ac.uk>)
Список pgsql-novice
>
>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Colin Gillespie wrote:
>| Dear All,
>|
>| I have four tables linked together with FK. An example is,
>deleting an
>| id in one table, deletes 1,000,000 rows in all the others. However,
>| this operation takes 2-3mins (currently this more or less empties the
>database.)
>| Is this slow?
>
>Depends on what hardware you're using. It sounds like you've
>done the right thing so far. I assume you've run explain on
>the stuff involved to make sure it's actually using those indexes.
We're have a 2.4Ghz Xeon with 2GB RAM. I've ran explain on SELECT
queries and they use the indexes. So I presume that the delete would
also use them.

When I use cluster it takes the time down to a few seconds . Is this the
best way then?

Thanks again

Colin

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

Предыдущее
От: "Douglas"
Дата:
Сообщение: Get comment
Следующее
От: Neil
Дата:
Сообщение: message type 0x44 - Again