Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

https://docs.djangoproject.com/en/dev/releases/1.6/

> Django now supports reusing the same database connection for several requests.

Pooling is onething, prepared statements is another.



Very true, that's what I was thinking, and saw this post

http://stackoverflow.com/questions/15856604/django-mysql-pre...

and read "django has no concept of connection pooling, and every page view uses a brand new database connection. MySQL prepared statements only exist for the life of the connection/session in which they are defined" on that page... So they're somewhat connected right? My understanding of a prepared statement was a statement that a *SQL server caches for quick use -- which is only kind of right (looked it up again @ https://en.wikipedia.org/wiki/Prepared_statement and it's not too far off).

Then question marks went off as to why this still wasn't a thing yet.


You are correct. Prepared statements without connection pooling is moot


Keep in mind that 1.6 isn't released yet — it's the upcoming version. This might prevent you from using it where you need it most (production): are you willing to use unreleased software in prod? If not, how far behind Django's development cycle are you? Also keep in mind that Django breaks compatibility between versions: upgrading might have a small cost in code changes. (Not that I consider this a bad thing: I think nearly all (if not all) of the changes I've had to make between Django versions have been beneficial. I love projects that kill off old APIs.)

That said: finally.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: