Ryan
Ryan

Reputation: 309

python sqlalchemy performance?

HI , I made a ICAPServer (similar with httpserver) for which the performance is very important. The DB module is sqlalchemy. I then made a test about the performance of sqlalchemy, as a result, i found that it takes about 30ms for sqlalchemy to write <50kb data to DB (Oracle), i don`t know if the result is normal, or i did something wrong? BUT, no matter right or wrong, it seems the bottle-neck comes from the DB part. HOW can i improve the performance of sqlalchemy? OR it is up to DBA to improve Oracle?

BTW, ICAPServer and Oracle are on the same pc , and i used the essential way of sqlalchemy..

Upvotes: 1

Views: 4868

Answers (3)

hyperboreean
hyperboreean

Reputation: 8333

I had some issues with sqlalchemy's performance as well - I think you should first figure out in which ways you are using it ... they recommend that for big data sets is better to use the sql expression language. Either ways try and optimize the sqlalchemy code and have the Oracle database optimized as well, so you can better figure out what's wrong. Also, do some tests on the database.

Upvotes: 1

Luper Rouch
Luper Rouch

Reputation: 9492

You should first measure where your bottleneck is, for example using the profile module.

Then optimize, if you have the possibility to, the slowest part of the system.

Upvotes: 5

Bojan Rajkovic
Bojan Rajkovic

Reputation: 1706

You can only push SQLAlchemy so far as a programmer. I would agree with you that the rest of the performance is up to your DBA, including creating proper indexes on tables, etc.

Upvotes: 1

Related Questions