dmwm / WMCore

Core workflow management components for CMS.
Apache License 2.0
46 stars 107 forks source link

make execute(many) for list of bind variable for select call. #8812

Open ticoann opened 6 years ago

ticoann commented 6 years ago

It seem it is not allowed at least current version of cx_Oracle, mysql_python https://github.com/dmwm/WMCore/blob/master/src/python/WMCore/Database/DBCore.py#L85

It is looping through list of bind and executing one by one. https://github.com/dmwm/WMCore/blob/master/src/python/WMCore/Database/DBCore.py#L100 https://github.com/dmwm/WMCore/blob/master/src/python/WMCore/Database/DBCore.py#L104

ticoann commented 6 years ago

@bbockelm, @hufnagel, Brian, Dirk, I was looking through document on cx_Oracle, but I couldn't find any specific topic about this. Do you have any suggestions?

bbockelm commented 6 years ago

@ticoann - are you talking about this one: https://cx-oracle.readthedocs.io/en/latest/cursor.html#Cursor.executemany ?

ticoann commented 6 years ago

Thanks Brian, I tried that one but didn't work. But it might be the case we are using old cx_oracle. (latest version is 7.0.0) https://github.com/cms-sw/cmsdist/blob/comp_gcc630/py2-cx-oracle.spec#L1

We have pretty new version of MySQL-python (lasted version is 1.2.5) https://github.com/cms-sw/cmsdist/blob/comp_gcc630/py2-mysqldb.spec#L1

But that doesn't support either. I will try to upgrade the driver and test.

bbockelm commented 6 years ago

Isn't present or doesn't work? The documentation for 5.x suggests that it should be present.