Efficient bulk updates with asyncpg

Let’s imagine that we have a database table with domains and related ip addresses and nameservers for each domain. We want to make updates for multiple records per one query rather than execute update for each domain.

Here is sample python list which consists of tuples with primary key, timestamp, nameserver list, and ip address list. This structure is used in a code below, for updates.

Continue reading Efficient bulk updates with asyncpg