Question regarding SQLites
#1

Hello i've questions regarding to SQLite.

1.) Updating the database every second.
Is it a good idea or bad idea, The reason why i want to update the database every second is to update the queries so that i can list the /topgame without a problem.

2.) Is having many rows (data, ex: score, money, etc...) is bad?
I've many rows, and most of them is important, Is it bad having many rows or just normal?

- Answer the topic nicely, Since i'm asking it nicely, i don't want the topic to be answer rudely.

NOTE: Don't answer the topic if you've no knowledge about SQLite.
Reply
#2

BUMP.
Reply
#3

I worked with SQLite a few times but i stopped cuz i didnt always realise what it should do (just like you now)

For one thing im sure...dont update it every second.
Your second question..well i see no big deal in that BUT i dont know how long your rows actually are
Reply
#4

Updating the database every second may causes lag for all players. Update it when it is needed.

About the rows, there are no problems with rows, you can have many rows you want.
Reply
#5

Do not update the database every second. I wouldn't recommend it with either MySQL (which is faster) or SQLite. Like iZN said, update it when it is needed.

SQLite can handle a lot of rows, that's not the problem. It is just that the more rows, the greater time it takes.
Reply
#6

Regarding second question
Quote:

Maximum Number Of Rows In A Table

The theoretical maximum number of rows in a table is 264 (18446744073709551616 or about 1.8e+19). This limit is unreachable since the maximum database size of 140 terabytes will be reached first. A 140 terabytes database can hold no more than approximately 1e+13 rows, and then only if there are no indices and if each row contains very little data.

It does takes time to create it and also you can have like lots of rows for it. More than 30
Reply
#7

If updating the data every second is bad idea.
Then how could i display the top list without the last status being displayed.
I want the top list to display the latest status.

Example.

Top List GamePlays:

1.) Jake_Hero (Online) Hours: Minutes: Seconds:
2.) JellalKoayz (Offline)
and so on.

Since the gameplay is updating in a timer that repeats every 1000 milesecond.
Same with the deaths and kills. I'm creating a top list, but the problem is, i want to display the latest status if the player in the top list is online.

Or what is good?

Top List which displays Last Status or Top List which displays the latest status for online players?
Reply
#8

Quote:
Originally Posted by _Jake_
Посмотреть сообщение
Since the gameplay is updating in a timer that repeats every 1000 milesecond.
Wait, what? Don't tell me you save players' data every second? Honeslty, that's ridiculous!

Let's say you want to show a top 10 about kills/deaths to a textdraw and that's why you want to show those data. Store those 5 results to an array and while a player getting kills/deaths, compare them with those of the array. If they're greater, replace the lesser with the greater etc.. and update the textdraw. No need of neither updating every second the players' data, nor selecting few data to show.
Reply
#9

No i mean the variables that i use is being updated not the database LoL.
And btw i will try your way but i don't quite understand it.
Can you please present me some examples and i will do the rest?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)