From: Cserna, Z. <Zso...@Mo...> - 2009-08-26 13:03:08
|
Hi all, We've found performance drop in python-sybase when upgrading from 0.38 to 0.39. We run it on Linux, python version 2.5.4 and python-sybase is linked to 15.0.0.7 version of sybase client library. The problem occur when we are fetching the results of a select query from the server. The difference between 0.38 and 0.39 is huge, we found 0.39 is about 10-100 times slower than 0.38. Please find the test script attached (rename it to .py). There's no difference in what table we select, it could contain text or number, it may have only one column or more columns. Usually we get the following output when using 0.38: Took 3.626094 seconds to fetch 10000 rows: 2757.788330 rows/second And from 0.39: Took 647.513509 seconds to fetch 10000 rows: 15.443693 rows/second If I replace the line calling execute() to the following: cursor.execute('SELECT top %d * FROM test_table' % rows, select=False) ...then in 0.39 it becomes fast, getting similar results as in 0.38. It seems to me that using ct_cursor (which can be disabled by select=False) results the performance drop in 0.39. Is there any reason to use ct_cursor or any drawback of not using it? Is this problem general? Or does it occur in our enviroment? Thank you in advance, Zsolt Zsolt Cserna Morgan Stanley | IDEAS Practice Areas Lechner Odon fasor 8 | Floor 07 Budapest, 1095 Phone: +36 1 881-3968 Zso...@Mo... -------------------------------------------------------------------------- NOTICE: If received in error, please destroy, and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. We may monitor and store emails to the extent permitted by applicable law. |