@Profiler.profile
def test_orm_query_cols_only(n):
 session = Session(bind=engine)
 for id_ in random.sample(ids, n):
  session.query(Customer.id, Customer.name, Customer.description).filter((Customer.id == id_)).one()

@ Profiler . profile def test_orm_query_cols_only ( n ) : session = Session ( bind = engine ) for id_ in random . sample ( ids , n ) : session . query ( Customer . id , Customer . name , Customer . description ) . filter ( ( Customer . id == id_ ) ) . one ( )
test an orm query of only the entity columns .