|
|
|
|
|
by mgkimsal
4149 days ago
|
|
Log and time your SQL queries, don't assume they'll always be worse. Sometimes you get bad SQL generated because ... the tables/objects were not set up properly in the first place. I'm an ORM-first person, and look for slow queries at certain points in development. Usually about 90+% of the queries from the ORM layer are fine and 10% need to be rerolled by hand for better performance. The other thing about ORMs I've learned in the last few years is that often you're not really needing an object back in the first place, if you're just reading the results vs modifying/saving. Hibernate projections (IIRC) just give you back a map, and save the overhead of trying to create an object (or object graph) to hand back. |
|