| От | Pierre C |
|---|---|
| Тема | Re: Question of using COPY on a table with triggers |
| Дата | |
| Msg-id | op.vfwpkgx0eorkce@apollo13 обсуждение исходный текст |
| Ответ на | Question of using COPY on a table with triggers ("Benjamin Krajmalnik" <kraj@servoyant.com>) |
| Ответы |
Re: Question of using COPY on a table with triggers
|
| Список | pgsql-performance |
> Essentially, we insert a set of columns into a table, and each row fires > a trigger function which calls a very large stored procedure For inserting lots of rows, COPY is much faster than INSERT because it parses data (a lot) faster and is more "data-stream-friendly". However the actual inserting into the tbale and trigger-calling has to be done for both. If the trigger is a "very large stored procedure" it is very likely that executing it will take a lot more time than parsing & executing the INSERT. So, using COPY instead of INSERT will not gain you anything.
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера