Paginates statements.