I have two lists of 100 elements each and a table that needs to be updated.
- list-A contains rowid records of a table-T.
- list-B contains values that need to be updated in table-T.
right now i have a query that loops over list-A by its rowid and updates a particluar field with value taken from list-B, if the rowid matches. The query looks like this :
"""update tableA set DKEY = :keyid where ROWID = :rid""",
{"keyid":str(uid), "rid":str(rowid)}
the problem is this query is a slow. Probably because i have to loop over 100 elements. So i wonder if there's a batch update technique out there that i could use to improve the query's performance.
My setup : Python 2.7.5, cx_Oracle 5.1, oracle 11g