[sorting] SQL vs SQLITE vs NVAULT
Which performs better ? sql or sqlite or nvault in sorting . I read recent thread and came up with the conclusion that nvault outperforms the other two but not in sorting.
Questions :- 1- Does nvault has limitation when as compared to sql / sqlite ? 2- Wat would u prefer if you are about to sort out a few hundred ( or 1000+) entries. Making and looping throughout the array when using nvault or sql / sqlite? [i got a feeling , sql would be better , still would like to clear my doubts] note - In my case i want to do it more frequently , like in client connect and sort out the data accordingly based on his steam id. 3- Provide me a benchmark , that would be appreciated. |
Re: [sorting] SQL vs SQLITE vs NVAULT
It depends. I don't know how many entries NVault keeps but SQL is based on long long int and it keeps at least 9,000,000,000,000,000 entries. SQL is faster, of course. People work on SQL for more than ten years. If you'd like to sort up to 3,000 entries use NVault. Otherwise, SQL.
Regarding limitation, I think NVault is limited to approximately 2,000,000,000 entries. About frequency, it doesn't matter. If you'd like to have at most 3,000 entries use NVault. Otherwise, SQL. That's only my opinion, I didn't perform any tests. Furthermore, the MySQL modules are able to keep 9,000,000,000,000,000 entries but this feature doesn't really apply to AMX Mod X. I believe everything regarding AMX Mod X is limited to approximately 2,000,000,000 entries. |
Re: [sorting] SQL vs SQLITE vs NVAULT
What thread did you read? That's not true. MySQL will always be faster due to indexed searching and the fact it was built for millions of operations per minute.
SQL also lets you sort the data right in the query. |
Re: [sorting] SQL vs SQLITE vs NVAULT
Quote:
|
Re: [sorting] SQL vs SQLITE vs NVAULT
|
Re: [sorting] SQL vs SQLITE vs NVAULT
Those benchmarks are useless because it absolutely depends on the type of data you want to send.
Inserting is only one side of the coin, the next step is reading. There are some things to consider: 1. MySQL (or SQLite) allows threaded querying, which will put your queries into a queue. This will effectively run the queries one by one in the background, which doesn't stress the CPU at all but takes longer time to process. You're not running a site with traffic similar to Twitter or Facebook, you want to put performance on first place. 2. MySQL (or SQLite) supports indexed searching by whatever you want. This will make looking for data INSANELY faster and much more CPU efficient. Index is something like having a "table of contents" in a magazine or a book. Instead of having to go through the pages one by one, you just look at the table of contents which will tell you exactly where what you're looking for is. This is a big plus with huge databases, as the speed and performance gain can be in thousands percent. Generally speaking, you cannot compare indexed search methods to looping through a file. 3. MySQL (or SQLite) is amazing if you want to store more data. If you were to go for a vault in this case, you'd have to format all of your data into a string and then parse it along with a key to the file. This can be slow and painful to deal with, tables are obviously the better option for larger amount of data. Ultimately, some things can be better done with a vault and many more things with MySQL. If you want us to tell you which option you should use, tell us what you want to do. Also it seems that many people go for vaults because the usage is pretty dumbed down in comparison to SQL solutions, although once you learn how to use threaded queries there's really no noticeable downside. Again, benchmarks like Hawk's are useless because it all depends on the type of data you want to insert/select and work with. If you decide to go with SQLite/MySQL, it's up to you which one you use. SQLite is easier to setup but lacks many performance options while MySQL is the exact opposite of that. |
Re: [sorting] SQL vs SQLITE vs NVAULT
I used to be pro-nVault for all scenarios due to the ease-of-use. It requires no knowledge of querying, you simply feed it a key and it gets your data linked to that key.
But now that I know how to write SQL queries, I will probably always use SQL if I need to do any type of retrieval with sorting\ordering or for a retrieval that is not a simple key reference. If you need to sort\order with nVault, you will need to load all data into an array, and then sort it. This can be painful when dealing with thousands of records. With SQL, your query can do all of the work for you. Another thing is when you want to store multiple pieces of data in nVault you need to put it all in one string (or have multiple entries for the one user, each holding 1 piece) Bugsy 15300money 100health 55xp And then when you want to retrieve it, you need to parse out the data element(s) that you want. It's not all that hard to do, but I'm just saying. With SQL you can simply select which fields from the record that you want to retrieve. SELECT Money FROM tbl WHERE steamid = 'STEAM_0:0:12345'; |
Re: [sorting] SQL vs SQLITE vs NVAULT
Thanks alot to everyone who helped me. So i decided to stick with sql/sqlite.
|
Re: [sorting] SQL vs SQLITE vs NVAULT
Quote:
Best players: PHP Code:
PHP Code:
|
Re: [sorting] SQL vs SQLITE vs NVAULT
Quote:
I made a XP plugin based on nVault .. it seems to be awesome(basis of reviews i got on that) and i am working more on it to make it distinguishable from rest Xp mods that exist. Any there any way i can get rank of any player(not just the top15 .. I did implement TOp15 and works fine) in the list on realtime basis from the nvault database just like HLX stats ? Will such realtime sorting consume a lot of CPU ? |
| All times are GMT -4. The time now is 09:47. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.