How to avoid the COUNT sql statement in gridview/listview?

Sometimes the COUNT statement may take much more time than the SELECT statement with LIMIT 10. I am wondering if it is possible to avoid the COUNT statement. Not displaying the total number of records is okay. For the pager, showing only "next" and "previous" link is okay.

For the pager is necessary to know the total amount of records at all times, otherwise, how would it find out how many pages the query has?

If you dont want to display something on the summary check for summaryText on the class reference in this site. Get rid of the {count} template.

Thanks. You reminded me the COUNT statement can be removed by setting pagination to false in the CActiveDataProvider config