| От | Tom Lane |
|---|---|
| Тема | Re: Trigger Performance |
| Дата | |
| Msg-id | 9362.1295199392@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Trigger Performance (Randall Smith <randall@tnr.cc>) |
| Список | pgsql-general |
Randall Smith <randall@tnr.cc> writes:
> I've created a trigger that checks the uniqueness of two columns in a
> table. Traditionally, one would use a unique constraint, but in my
> case, the size of the unique index would be too large and some
> performance loss is acceptable. However, the trigger performance seems
> to be far below what's indicated by an explain analyze of the query used
> in the trigger.
You realize of course that this is fundamentally broken and cannot be
trusted? Worrying about the performance seems rather pointless.
The reason it can't be trusted is that two concurrent insertions will
neither see the other one.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера