Hi,

A very simple question...

Context:
 * I only need to retrieve values from a table
 * I've a mapper object for the table

Question:
In a performance point a view which is the more suitable method:

- mappers = session.query(User).filter_by(name='ed').all()

or

- results = session.execute(select([User], User.name == 'ed'))


In case where the select statement is the fastest method, Is it
possible to transform a mapper query into a select query?
   ex:
query = session.query(User).filter_by(name='ed')
results = session.execute(select(query))

Thanks

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to