Jonathan Ellis wrote:
> SQLAlchemy uses bind variables wherever the db driver supports it.  I 
> think this even includes mysql, these days.

Yes, but I was talking about SQLObject (to which SQLAlchemy was being 
compared). "Is SQLAlchemy ready for production" was not really so much 
the intended question, as I read it, as "is SQLAlchemy better-prepared 
for production in comparison with SQLObject".

>     Additionally, there is a rather massive performance
>     impact on account of this same decision -- I've seen Oracle logs
>     indicating that 50% of the time spent by the database was soft parse
>     time, which would have been one-time-only per query (as opposed to
>     per
>     instance of a given query) otherwise
>
>
> You're confusing bind variables with prepared statements.

If you're using bind variables, then it's easy to cache prepared 
statements. If you aren't, you can't very well prepare a statement since 
the text will need to be different each invocation. I'm not confused; I 
was just making assumptions that one will do the sane thing when possible..

> If your queries run so fast that parsing is really your bottleneck, 
> then either you are working on a toy problem or you have so much money 
> to throw at fast disks that hiring Michael to write a prepared 
> statement cache for SQLAlchemy would not be a problem :)

This is a large, Java-based enterprise application -- not something 
which is a candidate for either SQLAlchemy or SQLObject, but a useful 
example to pull out when discussing scalability. It runs some extremely 
complex queries, and a lot of others which are simply much larger than 
they need to be due to including long (variable length depending on the 
invocation!) lists of GUIDs &c. inside the query text. Yes, it's 
frequently I/O-bound -- but according to Oracle's toolage, it would only 
be requiring half the CPU time it does if prepared statements (which in 
practical cases depend on bind variables) were in use.

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to