Hey guys!
I'm extremely new to MySQL. I started using it a few days ago to store data for players on the server. It's a simple table called user_info with 2 columns, uuid and nickname. Every time I want to get the nickname of a player, I query the database with something like this:
SELECT nickname FROM user_info WHERE uuid=<some_uuid>
Then from the ResultSet I use getString. This works fine, however there is a very slight delay between executing the query and receiving the string. For single users this is hardly noticeable, but if I want to get the nicknames of 100 players at the same time, I need to send 100 queries to the Database and then you start to notice a very significant delay of a few seconds, in which nothing on the server can happen. If too much of this happens the console gets mad for "running behind".
So... am I doing something wrong? Is a delay like that normal for selecting rows from MySQL? If so, what's a better way to grab information from 100 separate select statements with minimal delays?
Please let me know if you need anymore information about my code.
Thanks 😄