Re: Unexpected Seq Scan's when using MERGE WHEN NOT MATCHED BY SOURCE - Mailing list pgsql-performance

From Viktor Holmberg
Subject Re: Unexpected Seq Scan's when using MERGE WHEN NOT MATCHED BY SOURCE
Date
Msg-id fffd3a77-f9cb-44e5-91ea-11d6216f3f14@Spark
Whole thread
In response to Re: Unexpected Seq Scan's when using MERGE WHEN NOT MATCHED BY SOURCE  (David Mullineux <dmullx@gmail.com>)
List pgsql-performance
Apologies for the necromancer here but just chiming in that I also got bitten by this in our production systems today. It’s precisely the same pattern - MERGEing into a “part” of a table. Would be nice if MERGE allowed you to specify a “filter” or something so it only affected a subsection of the table - but Toms suggestion of pushing down the condition would also have saved me. For now I’m just going to have to abandon the MERGE construct and go back to separate INSERT and DELETE’s. 

/Viktor

pgsql-performance by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Query performance