There is a problem with rereading Query or Extent.
Currently, the logic works like this. When generating
a Query, columns corresponding to the DFG fields
of the target class are included in the SELECT.
Of the resulting objects, those *not* currently
instantiated in the PM get instantiated and are
given field values from the result row. Those that
are already instantiated are returned as-is.
Often, these old objects are in hollow state, so when
app wants to get some data from them it leads to
generating additional SELECTs for every object. That
leads to performance slowdown.
This logic should be made smarter such that if an
existing instance is in a Hollow or
state it likewise is given field values from the Query
result row. This way we have only one SQL SELECT not
many of them.
More details here:
Log in to post a comment.