Hi,
I'm new to sqlite.
I use it on my Counter Strike Source Zombie Mod game server.
I use eventscripts to access sqlite.
In eventscripts you can open memory databases like so.
es_xsql open stats_memory ":memory:"

And static databases like so.
es_xsql open stats_static |zmstats

In the stats_memory database I have a table called stats with created with
the following sql query.
CREATE TABLE stats (rank int(6), steamid varchar(25), playername
varchar(80), zkills int(6), hkills int(6), deaths int(6), degrade int(6),
prounds int(6), lastvisit int(20), points NUMERIC(12));

When a new map is loaded I update the static_memory stats database with the
records from the stats_memory stats database.

At the moment I grab the records from stats_memory stats, one at a time
using eventscripts. I then take the data into variables and write them to
the stats_static stats database using an update query.
This is very very slow. It takes 10 seconds to update 72 records. This is
not acceptable for my script.

I can however update the rank field in the stats_static stats database in
less than a second with over 1800 records and its even faster with the
stats_memory stats database.

This shows me that the problem is with eventscripts parsing the data from
one to the other.

Here is my question:
Is it possible to have a single SQL query execute on the stats_static stats
database and have it update from the records in stats_memory stats
database?.

I know how to access the stats_static stats database using sqlite
administrator (Database/open) but I don't know how to open the stats_memory
stats database?. Maybe you can only do this through a sql query but I don't
know how.

Any input is welcome.
Thankyou for your time.



-- 
View this message in context: 
http://www.nabble.com/Update-static-database-with-records-from-memory-database.-tp18187288p18187288.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to