I want to process over one million records synchronously in apex controller and want to show records SUM, COUNT, MAX, AVG etc on visualforce page as per the requirement. e.g. suppose a custom object has more than one million records and i want to show the sum of particular field having integer type, but i am receiving error : Too many query rows : 1000001
I have to show this count on visualforce page on button click event.
Please suggest any suitable solution for this. Your timely help would be highly appreciated.
Thanks Sachin