| От | Matthew Sackman |
|---|---|
| Тема | Re: Poor performance of delete by primary key |
| Дата | |
| Msg-id | 20050906154315.GL382@pongo.lshift.net обсуждение исходный текст |
| Ответ на | Re: Poor performance of delete by primary key (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-performance |
On Tue, Sep 06, 2005 at 11:32:00AM -0400, Tom Lane wrote: > "Brian Choate" <brianc@nimblefish.com> writes: > > We are seeing a very strange behavior from postgres. For one of our very = > > common tasks we have to delete records from a table of around 500,000 = > > rows. The delete is by id which is the primary key. It seems to be = > > consistently taking around 10 minutes to preform. This is totally out of = > > line with the rest of the performance of the database. > > I'll bet this table has foreign-key references from elsewhere, and the > referencing columns are either not indexed, or not of the same datatype > as the master column. Wouldn't setting the FK as deferrable and initially deferred help here too as then the FK wouldn't be checked until the transaction ended? Matthew
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера