On Saturday 28 February 2015 23:05:56 Ram Rachum wrote: > > Here is what I'm currently thinking about: Can we make Django do multiple > separate queries (SQL queries are separated by a semicolon right? Sorry for > being a noob) and send them one after another before blocking on reading > any of them? Only then when everything is sent, start reading and > populating querysets. *Is this possible to do with Django?* > > Not with Django as it is currently.
For every backend supported by Django, this would require different code. Sometimes the semantics isn't even equivalent. And from a brief look, it isn't very clear what kind of limitations this would place on the queries themselves. For Oracle you can only do this with stored procedures; for PG there appears to be away to avoid them, with unclear limitations [1]. Either way, it would be a lot of work and a large maitainability burden, and the gains don't seem to be all that large. Sorry, Shai. [1] https://blog.dsl-platform.com/multiple-result-sets-alternatives-in- postgres-3/