Re: Slow UPADTE, compared to INSERT

Поиск
Список
Период
Сортировка
От Ivar Zarans
Тема Re: Slow UPADTE, compared to INSERT
Дата
Msg-id 20031205164743.GA30510@alcaron.ee
обсуждение исходный текст
Ответ на Re: Slow UPADTE, compared to INSERT  (Richard Huxton <dev@archonet.com>)
Ответы Re: Slow UPADTE, compared to INSERT  ("Mike C. Fletcher" <mcfletch@rogers.com>)
Список pgsql-performance
On Fri, Dec 05, 2003 at 01:23:43PM +0000, Richard Huxton wrote:

> Better IMHO would be: "UPDATE table1 SET status = %s WHERE recid = %s::int8"

Thanks for the hint!

> unexpectedly in this scenario. The reason is that the literal number is
> treated as int4, whereas quoted it is marked as type unknown. Unkown gets
> cast to int8, whereas int4 gets left as-is.

This explains a lot. Thanks!
BTW, is this mentioned somewhere in PostgreSQL documentation? I can't
remember anything on this subject. Maybe i just somehow skipped it...

--
Ivar


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: [ADMIN] Index not used. WHY?
Следующее
От: Ivar Zarans
Дата:
Сообщение: Re: Slow UPADTE, compared to INSERT