CArrayDataProvider always requires all the raw data without offset and limit.
You would be better use CActiveDataProvider whenever it's possible. It will automatically apply 'offset' and 'limit' according to the pagination to optimize the query.