Tag: Open Source

Community

MySQL REPLACE INTO

(Michael McLaughlin) I overlooked MySQL’s real equivalent to a MERGE statement, which is the REPLACE INTO statement. A previous example uses the INSERT statement with the ON DUPLICATE KEY clause. The following demonstrates how to perform a left join from and exernal source.

Community

Using PostgreSQL Hooks

(Joshua Tolley) PostgreSQL is well known for its extensibility; users can build new functions, operators, data types, and procedural languages, among others, without having to modify the core PostgreSQL code. Less well known is PostgreSQL’s extensive set of “hooks”, available to the more persistent

Community

Update hot rows last

(Mark Callaghan) How do you get more throughput from a workload that has a lot of concurrency and transactions that contend on updating the same rows? Move the updates for the contended rows to the end of the transaction. This is a good problem to prevent as it is very hard to diagnose on production

Community

MERGE Syntax

(Peter Eisentraut) The SQL MERGE statement has gotten my attention again. For many years, PostgreSQL users have been longing for a way to do an "upsert" operation, meaning do an UPDATE, and if no record was found do an INSERT (or the other way around).