Starting admin panels

Query in custom table class seems to time out due to no limit. How do I
handle paging?