On 2013-06-01 09:41:13 +0100, Simon Riggs wrote:
> FK checks can be expensive, especially when loading large volumes of
> data into an existing table or partition. A couple of ideas for
> improving performance are discussed here:

Another idea would be to optimize away the row level locks if we have a
table level lock that already provides more protection than the asked
for row level lock. In bulk data loading scenarios that's not uncommon
and can matter quite a bit, especially if loading in parallel since
both, the wal traffic and the dirtying of pages, is considerably
reduced.

Should be implementable relatively easily in heap_lock_tuple without
being visible to the outside.

Greetings,

Andres Freund

-- 
 Andres Freund                     http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to