Raised This Month: $ Target: $400
 0% 

Database vs nVault vs flat file - resource & speed consumption


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
supergreg
Senior Member
Join Date: Jul 2007
Location: Oslo, Norway
Old 06-10-2009 , 13:01   Database vs nVault vs flat file - resource & speed consumption
Reply With Quote #1

I'd like to know if anyone has some stats on the various methods of storing lists of text - which are fastest, least expensive etc.

Currently I am working on a plugin which already connects to MySQL for some functions, so I have an SQLx tuple global available. I am about to write a simple function which will check nicks for bad words, and I am wondering if I should store the list of those illegal words in a text file, nVault or in an sql table.

Flat file and sql are equally easy to maintain, whilst nVault will require me to setup and use the nVault editor (or code a function to add+edit values ingame, which I am not prepared to do - but I might consider coding a function which when manually loaded reads a flat file and stores in nVault).

Are there significant differences in performance between the three, are there special scenarios where one is clearly prefferable in terms of speed and server load?

Thanks in advance, and sorry if it's in any FAQ I missed when searching. (How do you search this forum for specific phrases? It strips my quotes and +words)
supergreg is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 06-10-2009 , 13:06   Re: Database vs nVault vs flat file - resource & speed consumption
Reply With Quote #2

SQL uses specialized data structures to hold the information so, I believe it's the fastest and should be the preferred in every situation that deals with a significant amount of data. Since you can also have threaded queries, and you already know SQL, I recommend you SQL.
__________________
joaquimandrade is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-10-2009 , 13:09   Re: Database vs nVault vs flat file - resource & speed consumption
Reply With Quote #3

SQL also offers more angles for retrieving data while nVault only allows retrieving data using a single key.

If all you need to do is store a list of words then you can certainly avoid the overhead of SQL and use a plain text file or nvault.
__________________
Bugsy is offline
Reply



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 14:02.


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