How to make MYSQL load houses more lighter?
# support-forum
c
I have this function to load houses, its working, it runs everytime i restart the server But everytime i do restart the server it uses the whole CPU and screw up other stuff in running on the machine Thats because i have 10k houses on database setted in game Is anybody know how to refact it to does not eat my CPU?
r
Why 10k houses? Anyway, maybe load them in trans? Like, 100 per 10 seconds..
c
because i set every door on gta sa and also some custom places
what is load trans? instead of load all in one function load 1000 and then wait 10 seconds to wait more 1000? how to do it in a good way?
r
It s just an ideea, if you function is already optimized, but still get this lag, you can make a timer, to repeat every 10 seconds, and load 100 from your 10,000 houses, till you load all the houses
But it should not affect your server if your CPU is high just when you load the houses. It should decrease when the houses are all loaded