Update cycle_notification_history_in_batches.sql

This commit is contained in:
poveyd
2020-05-04 15:55:24 +01:00
committed by GitHub
parent 490d7d8d39
commit 557bf7aa7e

View File

@@ -12,6 +12,8 @@ WHERE t.id = p.id;
SELECT COUNT(*) AS "Number of rows remaining that need moving across from nh to nh_pivot" FROM nh_temp;
CREATE INDEX nh_temp_idx ON nh_temp (id);
-- In each function call, using same database connection as used for the above SQL (needs to be in a transaction; this can be inside a stored function or in a transaction from the code)
INSERT INTO notification_history_pivot