How do I paginate results with db_query? How do I paginate results with db_query in Drupal 7? I didn't find any example using db_query.
db_select() is the way to go using a so called query extender. Here is a simple example:

$query = db_select('node', 'n')
  -&gt;condition('type', 'article')
  -&gt;extend('PagerDefault')
  -&gt;limit(10);


Then theme_pager() can be used for outputting a pager.

Find more details on this drupal.org working example