SQLite efficiency questions.
#1


Two simple questions..

Firstly Question.

Which would be more efficient?

Opening all databases under OnGameModeInit, to be written into and updated when needed while the server is online.

or

Opening each database when required, for example the user database being opened and closed when a player connects and logs in.

I'm just wondering because, it seems quite silly to be opening and closing the databases constantly, rather than keeping it open and updating it throughout the servers online time...

Obviously there would be db_close under OnGameModeExit

But... What if the server crashes and the database wasn't closed beforehand?


Second question.

Is it possible to write the same information into two sepperate tables without re-writing the same query, but only changing the name of the table to be written to?

So if i have two tables inside one database file. I'd like to have one which would log an event, and another used to log the same event exactly the same way.


Reply


Messages In This Thread
SQLite efficiency questions. - by Outbreak - 06.12.2009, 20:21
Re: SQLite efficiency questions. - by Outbreak - 07.12.2009, 09:10
Re: SQLite efficiency questions. - by xxmitsu - 07.12.2009, 09:41
Re: SQLite efficiency questions. - by Dabombber - 07.12.2009, 11:34

Forum Jump:


Users browsing this thread: 2 Guest(s)