Debug cursors and queries.