CArrayDataProvider / Overhead?

Hi,

I’m using Yii and am wondering about the performance / overhead penalty when using CArrayDataProvider.

I am creating a list of members which should be browsable via pagination. The class reference for CArrayDataProvider states that you first create an array (e.g. via queryAll()) and then pass it to CArrayDataProvider.

It seems to me that if you use pagination, you retrieve ALL rows from the database that get returned via your query, and then pass it to the DataProvider which will only use the rows that are visible on the current page. In other words, that database server pushes a lot more data through the pipe than eventually displayed.

Is there a reason why this is implemented like this or am I missing something?

I would be thankful if you enightened me!

Thanks!

never mind. Just saw that there’s a CSqlDataProvider class :)