Skip to content

Commit 5e8e69c

Browse files
committed
Added Commit every row to avoid transaction overhead
1 parent 5528449 commit 5e8e69c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/airflow/dags/libs/SR_processing/db_services.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def update_temp_data_dictionary_table(
125125
"value_description",
126126
],
127127
fast_executemany=True,
128-
commit_every=10000,
128+
commit_every=0, # commit every row to avoid transaction overhead
129129
)
130130

131131
logging.info(
@@ -214,7 +214,7 @@ def create_temp_field_values_table(
214214
"frequency",
215215
],
216216
fast_executemany=True,
217-
commit_every=10000,
217+
commit_every=0, # commit every row to avoid transaction overhead
218218
)
219219

220220
except Exception as e:

0 commit comments

Comments
 (0)