15.02.2017, 10:27
Don't treat SQL like a dirty file system. You can fetch more than one row at a time. That's the point. Sending a separate query for each row is a massive waste of resources. Instead of looping over queries and fetching one result at a time, send one query and then loop over the results.

