Index: includes/database/query.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/query.inc,v
retrieving revision 1.58
diff -u -p -r1.58 query.inc
--- includes/database/query.inc	26 Oct 2010 15:26:09 -0000	1.58
+++ includes/database/query.inc	14 Nov 2010 15:33:16 -0000
@@ -336,6 +336,19 @@ abstract class Query implements QueryPla
   public function &getComments() {
     return $this->comments;
   }
+
+  /**
+   * Outputs debugging information for the query.
+   *
+   * @return Query
+   *   The called object.
+   *
+   * @see debug()
+   */
+  public function debug($label = NULL, $print_r = FALSE) {
+    debug(strtr($this->connection->prefixTables($this), $this->getArguments()), $label, $print_r);
+    return $this;
+  }
 }
 
 /**
Index: modules/node/node.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v
retrieving revision 1.101
diff -u -p -r1.101 node.admin.inc
--- modules/node/node.admin.inc	20 Oct 2010 01:31:07 -0000	1.101
+++ modules/node/node.admin.inc	14 Nov 2010 15:22:26 -0000
@@ -425,6 +425,7 @@ function node_admin_nodes() {
     ->fields('n',array('nid'))
     ->limit(50)
     ->orderByHeader($header)
+    ->debug()
     ->execute()
     ->fetchCol();
   $nodes = node_load_multiple($nids);
