Re: [GENERAL] UPSERT and HOT-update

2016-03-19 Thread Stephen Frost
Daniel, * CHENG Yuk-Pong, Daniel (j16s...@gmail.com) wrote: > I am doing a INSERT...ON CONFLICT...UPDATE.. on a table. The query is > mostly-UPDATE and does not change any columns most of the time, like > so: > > CREATE INDEX ON book(title); > INSERT INTO book (isbn, title, author, lastupdat

[GENERAL] UPSERT and HOT-update

2016-03-19 Thread CHENG Yuk-Pong, Daniel
Hi List, I am doing a INSERT...ON CONFLICT...UPDATE.. on a table. The query is mostly-UPDATE and does not change any columns most of the time, like so: CREATE INDEX ON book(title); INSERT INTO book (isbn, title, author, lastupdate) VALUES ($1,$2,$3, now()) ON CONFLICT (isbn) DO UPDATE set