Re: time penalties on triggers?
| От | Scott Marlowe |
|---|---|
| Тема | Re: time penalties on triggers? |
| Дата | |
| Msg-id | dcc563d10710041409kba8d9a7n3fc315238c0ea305@mail.gmail.com обсуждение исходный текст |
| Ответ на | time penalties on triggers? ("Jan Theodore Galkowski" <bayesianlogic@acm.org>) |
| Список | pgsql-general |
On 10/4/07, Jan Theodore Galkowski <bayesianlogic@acm.org> wrote: > Does anyone know, or can anyone point to information about how much > triggers penalize inserts in PG tables? I'm getting a report that it is > substantial, and before I investigate more. Using your DDL, with slight variations, I came up with this: create table ttest2 (i serial, lasttouched timestamp); \timing first test with no primary key and no now(): Time: 414.226 ms -- now with primary key: Time: 1180.121 ms -- No pk, with now: Time: 792.013 ms -- pk and now(): 1240.343 ms -- Now with a trigger, primary key, and of course now() from the trigger: 4823.051 ms The basic rule of thumb is that if you need fast triggers, you write them in C.
В списке pgsql-general по дате отправления: