On 15/07/2010, at 1:26 PM, Dan Kubb (dkubb) wrote:
Anyone else noticed this strangeness with GROUP BY and ORDER BY being
included for all association retrievals?
That's just the default behaviour to make the RDBMS act more
consistent with other datastores. The explicit grouping is to remove
duplicate records from the results, which is consistent with
relational algebra
Dan,
Did you investigate the performance cost of including Group By
in cases where the results are already unique? The sorting that's
required for ensuring uniqueness is often quite costly, forcing the
optimiser to use temporary tables, and quite a few RDBMS
optimisers don't detect the situation where the results must
already be unique - so you incur an extra cost by including it.
Clifford Heath, Data Constellation, http://dataconstellation.com
Agile Information Management and Design.
--
You received this message because you are subscribed to the Google Groups
"DataMapper" 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/datamapper?hl=en.