You could try looking at this discussion
of much the same question. For future reference, you
may want to try using the search or the Super Search
to see if your question has been asked before.
If you never want to see more than just 10 rows, you
might consider just adding a limit to your query.
Comment on (kudra: see previous answer of question) Re: Using the DBI to return the first ix/i rows