I am processing a table with 12 million rows in a postgresql database with the following query:
UPDATE EZDATA A
SET start_x = B.longitude, start_y = B.latitude
FROM public.stops B
WHERE A._1_boarding_stop_stn = B.stop_code;
Running the same query for 1 million rows takes 4 minutes. However running it for 12 million rows still run since 3 days.
Can anyone help me on optimizing this query, since it takes a long processing time?