@customers = Customer.find(:all)
pagination code here…
Displayes list of customers and has pagination 1,2,3,4…etc.
On clicking page 2, it will again run this(Customer.find(:all)) query in
controller. So, there will be lack of performance.
So, how to increase the mysql performace? Can i use the index as below
or any other way is there?
ALTER TABLE customers ADD INDEX(customer_id);