I would think that this does a full query and then ignores all the results except for getting the length. Did you try repo.open_tickets.count()? I think that should make SQLAlchemy only do a SELECT COUNT(*), which is easier on both the database server and the network.
Worth a try
Tried, but doesn't work:
TypeError: count() takes exactly one argument (0 given)
+1
Thanks