How to retrieve 5 records from database which is having 2 lakhs records

suppose, I have 2 lakhs records in my database, How can I retrieve first added 20 records from the database table. is there performance issue occurs, How can we handle it using batch process. Can I know how we can implement batch Process to retrieve large amounts of data.
1 answers

If you want to retrieve the first 20 records from the database table, you can use the “custom” range option in your retrieve action, as shown below:

Docs about that can be found here: 

We also have some docs about retrieving in batches: 

Hope this helps!