How to paginate using DAO?

Hi,

I have started exploring Yii recently. Building one simple application now.

The problem I face now is with respect to performance tuning.

How to paginate using DAO?

Where can I find a good tutorial on using DAO?

Please point me to the right direction.

My objective is to get minimum number of record from the db while listing the items.

Say the table has 100k items, user is on page 3, so I am offsetting to 3,n ( where n is number of records per page).

Is there any way I can do this using ActiveRecord?. Will there be any performance hit?

Thank you.

Note: I have wrongly posted this in 1.0.x forum, it should be in 1.1.x. Please move to the correct forum.

please see the details about the class of CPagination.