Thanks, this helps. A lot. Makes me think there could/should be an FAQ item on what can be selected from what type of objects and how. That'll go on my todo.
I could do this as a subquery. i actually might, as it appears to be running 10% faster as a subquery. The reason why it's CTE that I'm trying to optimize some very intense selects , and the CTE format is the most logical/readable/usable when writing raw sql. Everything has already been optimized based on indexes/etc , so i've been left to play with ordering/nesting the various subqueries to streamline the amounts of data postgres needs to handle. This has let me drop a 70s query against the entire database into 3.5s -- and searching a subset of recent records is only 50ms. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.