Reputation: 599
Is opening/closing db cursor costly operation? What is the best practice, to use a different cursor or to reuse the same cursor between different sql executions? Does it matter if a transaction consists of executions performed on same or different cursors belonging to same connection?
Thanks.
Upvotes: 2
Views: 732
Reputation: 22019
This will depend a lot on your database as well as your chose python implementation - have you tried profiling a few short test operations?
Upvotes: 1