What is ViewState?
Any data that is displayed on visualforce page first it will go to view state state then it will show on visual force.
Datalimit is 170KB.
Above 170KB it will throw error.
By using pagination we can avoid viewstate error.
Otherways in pagination using are with SOQL:limit and offset.
Every time soql query has to be run
It will accept only 2000 offset.