View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-07-2016 , 22:26   Re: [SQLite] Combining Rows like nVault
Reply With Quote #5

Why do you have so many rows? Each row should represent each unique player. Based on 500k rows, I doubt this is the case unless you have an awesome server. Can you explain how data is being stored for each player in your database? What is uniqueID? You should be storing all player data using steamid as the primary key. This would mean there would be only 1 row for each player in the database and your row count should never reach a point where it causes lag. If it does, you should timestamp all data and purge it frequently to delete stuff that is X days old.

I've been a big fan of nVault since I started AMX-X scripting but after learning SQL I've been a huge fan of it. nVault is great if you need a simple key -> value lookup. But if you need to do any type of querying (top 15, rank, etc), SQL is the way to go.

I can help you get things fixed, but I need to understand better what you are trying to accomplish. Please don't say 'I want to save abc 123 sss 555 fff for each player'. Explain what you want your end result to be and I will provide an efficient way to do it.
__________________

Last edited by Bugsy; 09-07-2016 at 22:36.
Bugsy is offline