The closed ticket #10, says "the parent Mapper still always adds an "order by
<maintable>.oid" type of thing to insure parent object order. my only concern
about that is it might add a performance hit to a query, and its not really
needed in a lazyload."
Well, I can verify that it does take a performance hit when using a desc(col) ,
mainly as it stops the db using the 'col' index if defined, i.e. the sql ends up
as '... ORDER BY table.foo DESC, table.oid', which, in Postgres at least,
results in the query optimizer not using any indexes.
What scope is there for changing this? One possibility is to add DESC to the oid
as well, which would at least let the optimizer select a (foo, oid) index. Can
the order by OID be removed completely and the sort for parent object order
moved into python?
Robert
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users