You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Item Load (33.6ms) SELECT items.* FROM items LIMIT 10 OFFSET 0
SQL (11378.1ms) SELECT COUNT(*) FROM items
This is especially a problem with innodb, as count(*) is very slow.
Problem appears to be in active_record.rb the total_entries method does @total_entries ||=. But it's not set via the paginate call somehow.
I can't quire wrap my head around which is the Collection object's instance variables and which are in the active-record relation, so I can't quite follow how it should work.
The text was updated successfully, but these errors were encountered:
Aah, perhaps it's because in the paginate submodule you set total_entries = wp_parse rather than self.total_entries = wp_parse? Or @total_entries. Hmm, hacking it and using @total_entries instead still doesn't show up with total_entries() is called.
Loading development environment (Rails 3.0.9)
is=Item.paginate :page => 1, :per_page => 10, :total_entries => 100
Item Load (33.6ms) SELECT
items
.* FROMitems
LIMIT 10 OFFSET 0SQL (11378.1ms) SELECT COUNT(*) FROM
items
This is especially a problem with innodb, as count(*) is very slow.
Problem appears to be in active_record.rb the total_entries method does @total_entries ||=. But it's not set via the paginate call somehow.
I can't quire wrap my head around which is the Collection object's instance variables and which are in the active-record relation, so I can't quite follow how it should work.
The text was updated successfully, but these errors were encountered: