Re: Call of function inside trigger much slower than explicit function call
В списке pgsql-performance по дате отправления:
| От | Alexander Gorban |
|---|---|
| Тема | Re: Call of function inside trigger much slower than explicit function call |
| Дата | |
| Msg-id | 1234952647.8514.32.camel@gas-laptop обсуждение исходный текст |
| Ответ на | Re: Call of function inside trigger much slower than explicit function call (Robert Haas <robertmhaas@gmail.com>) |
| Список | pgsql-performance |
> Well, that does sound weird... can you post the full definition for > the images_meta table? Are there any other triggers on that table? > Is it referenced by any foreign keys? How fast is the insert if you > drop the trigger? > > ...Robert Yes, weird. Something was wrong in my own code, after I've rewrite it to send you full sources of problem example, execution times of image insertion and direct scaling function call became the same. Insertion of 4000x2667px (2MB) image and direct function call for downscaling original image to 800x600px and 128x128px both takes 1.6 sec. Sorry for confusion. And it is almost the same time that takes command line utility to do the task. So, practically there is no overhead of using triggers for such purposes. Nevertheless here is my sources, maybe there is a better way to solve the task? http://www.filedropper.com/imscalepgexample
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера