Millions insert in mysql
#1

Hi,

I have about ~2mil messages in database. I'am loading for player, by his name, and it takes about ~2~-4 seconds to show. What when will by 200mil messages, and i need SELECT ? it takes 1,2 min to show ? what to do?
Reply
#2

learn more sql here http://use-the-index-luke.com/
Reply
#3

You should have split up / used another system to save the messages in the Database. You could have one table for all names that starts on "A" and another table with "B" and so on (depending on how many players u've got).

Also, you can read about load balancing. I don't think it's a good idea keeping all information in one table, especially when you have those amounts of data in it.
Reply
#4

Thanks for idea. What query should i do if i want to create tables, from that large messages? like there is name and message, and i want to create table sms_%s, and then write there that messages of that player.
Reply
#5

I would really consider only storing them for a specific amount of time and perhaps deleting the rows in OnGameModeInit if they're older than this date.
Reply
#6

MySQL can hold billions of things well if you use indexes correct.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)