On 7/1/06, Charles Duffy <[EMAIL PROTECTED]> wrote:
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".

Whoops, sorry.  No reading comprehension points for me. :)

>     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.

Given the state of the python DB api (specifically, there is no standard for creating prepared statements) I think SA is prioritizing the right things by not doing PS yet.

> 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

[...]

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.

Optimizing CPU in an I/O bound app is practically the definition of premature optimization. :)

--
Jonathan Ellis
http://spyced.blogspot.com
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