Quote:
Originally Posted by 01101101
Ok hawk, you win. However, I did some benchs with a table structure like this
PHP Code:
DROP TABLE benchsql; CREATE TABLE benchsql ( key2 INTEGER PRIMARY KEY, value INTEGER )
and read speeds increased A LOT
PHP Code:
L 02/14/2011 - 16:42:18: [sqltest.amxx] SQLiteInit: 0 L 02/14/2011 - 16:42:18: [sqltest.amxx] nVaultInsert: 0 L 02/14/2011 - 16:43:41: [sqltest.amxx] SQLiteInsert: 83 L 02/14/2011 - 16:43:41: [sqltest.amxx] nVaultRead: 0 L 02/14/2011 - 16:43:41: [sqltest.amxx] SQLiteRead: 0 L 02/14/2011 - 16:43:41: [sqltest.amxx] nVaultClose: 0 L 02/14/2011 - 16:43:41: [sqltest.amxx] SQLiteClose: 0
|
Try it with more records, like 100000 or so. Your results are inconclusive. I always ran my benchmarks to a number of records that were enough for either SQLiteRead() or nVaultRead() to be at least 1. nVault could still be faster even with that structure. They're not the same; the precision of the test was just not enough to draw any conclusions.
Quote:
Originally Posted by 01101101
Still, nvault is the same at reading, and much faster at inserting. For data read/write, nvault will win. I was actually impressed not by sqlite slowness but nvault speed.
|
No, we not only can't conclude that from your test results, but it's for an isolated case which nVault isn't even optimized for and that AMXX plugins are rarely going to use. That is, the case where we are 1) associating an integer to an integer and 2) loading the entire table. Neither of those criteria are common, let alone both of them together. Individual fetches are still insanely slow for SQLite compared to nVault.
Quote:
Originally Posted by 01101101
Maybe (or probabbly) for complex queries (since SQL is not thought for tables like this ones) sql will outperform nvault, however for amxmodx you probabbly will use 99% of times simple queries, so I give this to you too.
|
Again, you can't even compare those. If nVault doesn't support something, you can't say that "SQLite is faster because it does support it." If you want to implement sorting with nVault, it must be done in Pawn, so then you're benchmarking Pawn to SQLite.
Quote:
Originally Posted by 01101101
PD: MySQL should be actually slower than SQLite
|
I think I already said that somewhere but common sense would dictate that, since MySQL has more overhead such as the authentication system and the fact that the server is actually separated from the client.
Quote:
Originally Posted by 01101101
PD2: Still, fior most cases Id still use SQL (I use MySQL) because "key value" structure is useless for the use I have. 15ms difference arent worth the usefulness of RDBMS. Its like comparing assembly and .net. However, topic was about speed, so, you win.
|
That wasn't the question or topic.
Quote:
Originally Posted by 01101101
PD4: What are your pc specs? I have a quad core and you benchmarks took me like 10x longer.
|
I used my $10/mo VPS server. I don't know the actual specs, but I think that the resources I get allocated actually vary throughout the day.
__________________