One of the newspaper sites I work on has several hundred thousand nodes of content. Because of the fairly large dataset, Drupal's core paging system can take several seconds just to run the count query required to return the total number of pages in a list of content. As a solution, I created a simple module to solve this problem for Views pagers. The module adds an additional pager option called "Lite" that produces a simple pager without executing the expensive COUNT query required by the default pager.
I'm posting this here to see if there is enough interest to add the module to Drupal.org. For now, the code lives at Github. For more information, checkout the project page on my site below.

Comments
Duplicate Module?
http://drupal.org/project/prev_next
No
I am the author of the Prev/Next module. It has a different use case, where you want links or thumbnails from one node to the one before and after it so you can "page" through the nodes by chronological/posting order. You are on a node already, not a list of nodes.
The lite pager solves another performance/scalability issue, when viewing the pager on a list of nodes generated by views.
So, yes, go ahead and contribute it, and bonus points if you can extend it to apply to core's pager as well to avoid this query.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
subscribing. this sounds
subscribing. this sounds interesting!!
--
http://ball.in.th - ชุมชนคอบอลพันธ์แท้, ผลบอล
There is another solution for
There is another solution for pager problem. It does not completely eliminate the count(*) query as your solution but atleast caches the query. There is already patch for views 2.x but that can not be commited till views 3.x patch also submitted.
If you are familair with views 3.x please consider helping to get this patch commited. This will help thousands of sites using views.
http://drupal.org/node/550962
Definitely interested
Anything around reducing the load of Views (pagers, page generation) for media sites is more than welcome.
I'll have a look about this module and will review it as I'm facing some perf issues in a similar context.
You might be not that
You might be not that familiar with views 3.x :)
There is a solution already which really integrates into views. It's called pluggable pagers for views. You can write your own pager for views!
If you need just a "next page"-pager you don't need to know the count of items.
So just query one additional item.
If you get one result more, there is a next site, if not then not.
This is already implemented on a more or less tested version: http://drupalcode.org/viewvc/drupal/contributions/modules/views_plugins/...
If someone has another idea i could implement it as preperation for drupalcon copenhagen :)
From very fast scanning of the code i think litepager does something else, but i'm not sure.
Dude
I just want to go on the record and say that this module has already cut load time by SECONDS on some of my key views. Sir, I am grateful for your contribution. Seriously. This is a life saver.
Can I help in any way to get this ported over to a proper project? This needs to happen.
Module Released
I finally got around to adding this as an official project.
http://drupal.org/project/views_litepager
--
Nathan Rambeck
Thanks!
Thanks for solving my problem a year before I even found it!
Working on a site that has 20mil nodes, so uh... yeah... paging search results doesn't go over well
Recommended release
This sounds pretty interesting. You might wanna take a look at this though.
I marked the release
I marked the release correctly, but it appears to have taken some time to get recognized via drush. It works ok now.
--
Nathan Rambeck
FYI, great pager
FYI, great pager strategies:
http://www.percona.com/ppc2009/PPC2009_mysql_pagination.pdf
http://www.mysqlperformanceblog.com/2008/09/24/four-ways-to-optimize-pag...