I'm wondering why displaying the list view in AS, the count SQL
generated includes all associations in the list view.

I know I can override this with config.list.count_includes, but it
seems to me that the default should be to include no associations in
the count, rather than all of them.

>From what I can tell in the 99% case, the addition of the includes to
the count does nothing but slow down the query.

SELECT count(DISTINCT `a`.id) AS count_all FROM `a`  LEFT OUTER JOIN
`b` ON b.a_id = a.id
will return the same value as
SELECT count(*) FROM a
 in every case when id is a primary key on a

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to