Paulo Aquino wrote: > Are there performance difference between the following line of codes. > > > a. > > for instance in Query: > print instance.id > > b. > > for instance in Query.all(): > print instance.id
b. is equivalent to list(query). Differences are negligible since the full results are buffered before __iter__() returns the first row. > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
