I have two tables: the main and temporary one that is updated frequently. The main one has a schema:
id bigint primary key,
customer_id bigint unique not null,
value real not null,
update_time timestamp not null
and the temporary one has:
customer_id bigint unique not null,
value real not null,
update_time timestamp not null
What is the most effective way to update the first table with the content of the second table if the second table is not empty? The second table can have new customer_id