Re: Slow delete
От | Sean Davis |
---|---|
Тема | Re: Slow delete |
Дата | |
Msg-id | 861A38F1-4840-11D9-937A-000D933565E8@mail.nih.gov обсуждение исходный текст |
Ответ на | Slow delete ("Colin Gillespie" <C.Gillespie@newcastle.ac.uk>) |
Список | pgsql-novice |
Colin, I'm not sure, but if the larger table could be clustered by the foreign key index, would that speed things up? This only works if clustering makes any sense for the table. See this link for clustering (http://www.postgresql.org/docs/7.4/static/sql-cluster.html). Perhaps someone else will add some more detailed comments. Sean On Dec 7, 2004, at 5:54 AM, 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? > > I have checked that the FK have been indexed and that they have been > declared intergers. A full vacuum has also been performed. > > Does anyone have any suggestions on how to speed this up? > > Thanks > > Colin > > ---------------------------(end of > broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster
В списке pgsql-novice по дате отправления: