Re: Delete Performance
| От | Tom Lane |
|---|---|
| Тема | Re: Delete Performance |
| Дата | |
| Msg-id | 18528.1005963694@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Delete Performance ("P.J. \"Josh\" Rovero" <rovero@sonalysts.com>) |
| Список | pgsql-general |
"P.J. \"Josh\" Rovero" <rovero@sonalysts.com> writes:
> But even with sequential scan, the catalog entries are
> deleted quickly (30K records in just a couple of seconds),
> vice slow deletes (2 per second) for the toasted text.
> The catalog entries are about 200 bytes (integers, timestamps,
> a couple of short fixed length strings), while the toasted
> text table has one short text field, one timestamp, and one
> long (2K to 20K bytes) toasted text field.
I observed over in pg-hackers that deletion speed seems to be
proportional to total volume of data deleted, but that's not enough
to explain your results. You're reporting a 10000X speed difference
with only 10-100X difference in data volume, so there's still a large
factor to be accounted for.
Are you sure you don't have any rules, triggers, foreign keys involving
the slower table?
regards, tom lane
В списке pgsql-general по дате отправления: