Malcolm Tredinnick schrieb:
> What is the advantage of doing this? The only saving you're making here
> is the amount of data you are sending from your client to the database
> server. Since that is generally going to be no worse than over a local
> network, the difference between, say, 2K and 1.5K (in the big case) is
> really nothing, compared to the time to run the query, return the
> results, process the request back to the user, etc. Have you benchmarked
> something that shows this really speeds things up noticeably?
It might even be make the total query time longer, since it could
be harder for the database query parser to find the corresponding
tables for the columns.
Anyway, the sql generation code has some heavy problems, and it's
the wrong time to make it any more complicated without fixing
the bugs. Ever tried stuff like:
models.Thing.objects.extra(
tables=["upsy"],
where=["(thing.upsy=upsy.id and upsy.daisy=1)"]) \
| models.Thing.objects.extra(
tables=["upsy"],
where=["(thing.upsy=upsy.id and upsy.daisy=2")])
Even combining normal query sets with joins with "|" or "&"
doesn't work the right way.
The sql generation code is just too simple to find out about the
joined tables, and it's not possible without a major rewrite to
support rewriting the sql query.
For me, -1
Michael
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---