3 ms·
> Slow database queries and network latency If someone could add prepared statements to Django ORM, we could see a significant performance increase. And mysql
by est 13y ago
> Slow database queries and network latency
If someone could add prepared statements to Django ORM, we could see a significant performance increase. And mysql protocol support compressions, if your very buzy page requires move big text/blob out of mysql it could be very useful.
- hardwaresofton 13y agoWow, is it still true that django doesn't do any connection pooling? I have long since switched to Flask, personally (no hard feelings, just like flask's minimal nature) -- and I haven't been keeping up with developments
- est 13y agohttps://docs.djangoproject.com/en/dev/releases/1.6/ 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.
- hardwaresofton 13y agoVery true, that's what I was thinking, and saw this post http://stackoverflow.com/questions/15856604/django-mysql-prepared-statements 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 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.
- est 13y agoYou are correct. Prepared statements without connection pooling is moot
- deathanatos 13y agoKeep 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.
- iends 13y agoConnection pooling is finally coming in 1.6.