Raised This Month: $12 Target: $400
 3% 

Efficient Database Insertion


Post New Thread Reply   
 
Thread Tools Display Modes
VoiDeD
AlliedModders Donor
Join Date: Mar 2009
Location: Illinois, USA
Old 11-15-2015 , 15:32   Re: Efficient Database Insertion
Reply With Quote #11

Quote:
Originally Posted by Potato Uno View Post
This is an sqlite database, so each query takes microseconds (~ 0 ms) to execute.
There are far most costs involved with a sqlite query than just the execution time as seen from a plugin. You'll have a massive disk I/O hit when sqlite decides to flush the database to disk. If you use transactions you'll see an additional hit from journalling. Depending on the kind of disk you're running on, this can bring SRCDS to a halt if it attempts to read/write a file when your I/O queue is growing.

Food for thought: properly tuned mysql servers can handle thousands of queries per second. Your bottleneck won't be the database, it will be how quickly SM's database worker thread can handle your query throughput. For that, you'll have to do some profiling, but 15 queries a second sounds like such a minuscule amount.
__________________

Last edited by VoiDeD; 11-15-2015 at 15:32.
VoiDeD is online now
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode