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

I think the idea here is, is spamming multiple SQL_TQuery calls more inefficient (and not like by 10% but like 50% more) than calling one transaction? I can care less how hard the database thread has to work since that runs off-thread. Since this is SQLite, the query lasts like 0 ms, (and 1 frame is 15 ms), so that's not even a concern. It's pawn performance that might be the killer here since that shares the same thread with srcds.

I mean if there is a negligible difference between a transaction and multiple SQL_TQuery calls (all queries are on the same default priority level - FYI), then I'd obviously take SQL_TQuery spam since transactions have that risk where if one query fails for some reason, the entire transaction is dropped.
Potato Uno is offline