This content has been marked as final. Show 2 replies
Do you have an index in FILE_PATH column? Do you have your statistics up to date?
It depends on a number of factors, most of which are to do with the database and nothing to do with Python:
- How many rows are in the table?
- How big is each row?
- How much space do you have allocated to rollback segments, temporary tablespaces and swap space?
- How much memory do you have on the database server?
- What other transactions are going on in the database when you issue the delete command?
- What other processes are running on the database server?
Having said that, the first thing to investigate is how long this statement takes without Python getting involved. Issue the delete statement from a SQL*Plus command line and compare the execution time. If it is similar to the time you posted using Python then I think that you can rule out 'using cursor to delete table is very slowly'