Re: seemingly slow for-loop in plpgsql

Поиск
Список
Период
Сортировка
От Claus Guttesen
Тема Re: seemingly slow for-loop in plpgsql
Дата
Msg-id b41c75520809030020h5235e5c3y1991b21393ed5799@mail.gmail.com
обсуждение исходный текст
Ответ на Re: seemingly slow for-loop in plpgsql  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
> Why in the world are you using a for-loop for this at all?  It would be
> tremendously faster as a single SQL command:
>
> update duplicates set hashcode = rtrim(hashcode, E'\n') where length(hashcode) = 33;

Thank you. I was "caught" in the plpgsql-lane. This is of course much
simpler and much faster.

-- 
regards
Claus

When lenity and cruelty play for a kingdom,
the gentler gamester is the soonest winner.

Shakespeare


В списке pgsql-sql по дате отправления:

Предыдущее
От: Achilleas Mantzios
Дата:
Сообщение: Re: order of rows in update
Следующее
От: "Pavel Stehule"
Дата:
Сообщение: Re: How do I get min and max from an array of floating point values