SQLite
#1

Hey, just a quick question. Is it better to open and close an SQLite database each time you save to it or to just open and close it as the server starts and stops? I'm using it for user accounts so it will most likely be accessed a lot.
Reply
#2

Quote:

close it as the server starts and stops

Each time you query something, it automaticly saves.
Reply
#3

Quote:
Originally Posted by FireCat
Посмотреть сообщение
Each time you query something, it automaticly saves.
Yea, I've been doing it like that so far but I've seen it done by opening and closing it in a function.

Thanks for your feedback.
Reply
#4

I only had one DB, I opened it when the server started and closed it when I closed server.

I had it like that for days on a, let's say: 10 - 20 players daily for a few hours. So I would recommend leaving the DB open and just access info on the fly ( Instead of opening-closing ).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)