| От | Dr. Evil |
|---|---|
| Тема | Re: pl-sql |
| Дата | |
| Msg-id | 20010719020507.11840.qmail@sidereal.kz обсуждение |
| Ответ на | pl-sql (Aarmel <pgadmin@animated.net.au>) |
| Список | pgsql-general |
pl/pgsql can give a real boost if you need to aggregate values in a way that doesn't have an existing SQL function. For instance, there is an SQL function which will take an average. However, what if you need some other statistical type of average which isn't supported in SQL? For the sake of an example, let's say that median isn't supported in SQL (it may be, I haven't checked). If you need to take the median of 10000 rows, it will be very slow if you do all that on the client. It will be much faster to write median in pl/pgsql and just do it on the srver. Also, pl/pgsql queries get optimized before they are run, so there is some benefit there, too.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера