How can I speed up this PostgreSQL UPDATE FROM sql query? It currently takes days to finish running
问题 How can I speed up the PostgreSQL UPDATE FROM sql query below? It currently takes days to finish running. UPDATE import_parts ip SET part_part_id = pp.id FROM parts.part_parts pp WHERE pp.upc = ip.upc AND (ip.status is null or ip.status != '6'); And why does it takes days to run in the first place? Most of the time, I manually kill the query because it takes too long to run like more than 24 hours. Last time it successfully finished running, it took almost 38 hours. import_parts table has