I need to speed up, add and remove rows from the auth.models.User table, unfortunately ...
when I do this, the table is locked and I cannot execute any SELECT queries on the table.
I surround these @transaction.commit_manually queries, which may have something to do with table locking.
The transaction is as follows:
for row in csv_reader: update_sql = "UPDATE auth_user SET last_name = '%s' WHERE username = '%s'" %(row[2], row[0] ) cursor.execute(update_sql) if not index % 100: print index: print index transaction.commit()
I also use Sql Server 2008 , I would like to know if it could be specific to Sql Server or if such actions would block the table in PostgreSQL and MySQL too.
Any ideas guys? :)
source share