I have a query using join() where my tables have a few hundred thousand records in Postgres, that takes about 30-45 seconds regardless of how the tables are indexed:
query = Session.query(SmartdataEligibilityRecord).join(Member).filter(Member.id==SmartdataEligibilityRecord.member_id).order_by(Member.last_name.asc()).all() If I rewrite this as: connection = engine.connect() trans = connection.begin() qs = "select * from smartdata_eligibility_records,members where members.id=smartdata_eligibility_records.member_id order by members.last_name asc;"; query =connection.execute(qs) connection.close() it flies, taking only a few seconds. My problem is that now the query object is a ResultProxy type. It looks like under the former way I was doing this, using join() it returned tuples. Now I am getting errors such as: "TypeError: Sorry, your collection type is not supported by the paginate module. You can provide a list, a tuple, a SQLAlchemy select object or a SQLAlchemy ORM-query object." Is there a way I can casr this ResultProxy obect to a usable object here (like tuples?) Thanks, RVince -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.