View Single Post
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 11-14-2015 , 20:56   Re: Efficient Database Insertion
Reply With Quote #8

@tommie: Nope, that won't work (45 minutes / mvm game x 60 seconds / minute x 15 queries / second). That's asking for a disaster right there with RAM (the number is 40k).

@Impact: That benchmark was really useful. So it is 30% slower (yikes) to spam SQL_TQuery multiple times than to run a full transaction.

There is a 60 second timer loop that runs forever throughout the game in the exact same plugin. Is it wiser to haul all the queries to a transaction object, and then once that 60 second timer loop fires, execute the transaction and make a new transaction object? Would there be potentially any issues with that? (I'd have to catch the transaction being executed under OnPluginEnd or a commandlistener of "quit".)

Last edited by Potato Uno; 11-14-2015 at 20:57.
Potato Uno is offline