I enabled SQL logging recently, and started looking at the generated
SQL from Mapper. I was surprised to see that "select DISTINCT" was
generally being done for queries when it is not necessary. Is that
really necessary?
For example:
Team.findAll(OrderBy(Team.name, Ascending))
translated to:
SELECT DISTINCT team.code, team.name, team.id FROM team ORDER
BY name ASC
Queries should perform better without a redundant DISTINCT operation.
I must say that I am surprised to see the DISTINCT added when a
Distinct object/class exists -- I would have expected that I would
have needed to use the Distinct object/class in order to generate the
DISTINCT keyword.
--
You received this message because you are subscribed to the Google Groups
"Lift" 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/liftweb?hl=en.