I am making a python script to insert some data into a postgresql database.
Following the postgresql documentation to speed up the loading process, my script has this structure
- Connect to database and create cursor
- Drop all indexes
- Download all data with the copy command
- Recover All Indexes
- Commit and close cursor and join (only commit as a whole script)
So my question is: does the index throw before commit, what does it have any effect in terms of speeding up loading or not?
source
share