What type of DB are you using and what version of Retool are you on?
A number of resource types have different methods for appending rows to your database. To take the Google Sheets resource as an example, you can use the "Append data to a spreadsheet" action to add multiple rows to your sheet at once:
I found the fix. Recently saw a retool document for iterating Query results in Retool while triggering a query (for my case, an insert into spreadsheet query) . Here is the link and it works perfectly: