Views Calc Pager

Component ID

1580258

Component name

Views Calc Pager

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

499

Component created

Component changed

Component body

This module provides a pager for MySQL-backed views which uses the SQL_CALC_FOUND_ROWS hint to provide pager count information, avoiding a separate SELECT COUNT(*) query. For views whose queries are on the slower side, this can save as much as 50% (or possibly more) in query execution time.

In circumstances where SQL_CALC_FOUND_ROWS adds significantly to query execution time, this can cause paged views to perform slower on pages 2+ because the COUNT(*) query is cacheable while the results of SQL_CALC_FOUND_ROWS is not. For views where SQL_CALC_FOUND_ROWS does not add appreciably to query execution time, performance for pages 2+ will be as good or better than the standard pager.

If you do not need a pager with true page counts, a good alternative to this pager is Views Litepager which will execute as fast as views_calcpager, or possibly much faster, with the drawback that a page count is not provided.

Development of this module is sponsored by AllPlayers.com.