Mercurial > gemma
diff pkg/imports/track.go @ 4036:e45442db19b1 faster-agm
First stab to make AGM imports faster by avoiding unnecessary inserts. Also delete un-updated measures in time ranges.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 24 Jul 2019 11:46:41 +0200 |
parents | 59055c8301df |
children |
line wrap: on
line diff
--- a/pkg/imports/track.go Wed Jul 24 10:54:18 2019 +0200 +++ b/pkg/imports/track.go Wed Jul 24 11:46:41 2019 +0200 @@ -22,6 +22,10 @@ trackImportSQL = ` INSERT INTO import.track_imports (import_id, relation, key) VALUES ($1, $2::regclass, $3)` + + trackImportDeletionSQL = ` + INSERT INTO import.track_imports (import_id, deletion, relation, key) + VALUES ($1, $4, $2::regclass, $3)` ) func track(ctx context.Context, tx *sql.Tx, importID int64, relation string, key int64) error {