[Release] MySQL Async Library - 3.0.8

dev
mysql
basemods

#567

Actually do this should fix that well take it away ```
set mysql_slow_query_warning


e.g.

set mysql_slow_query_warning 50


to print all queries that take more than one server-tick to complete. Setting it to 0 should disable the slow query warnings.

#568

This is a warning. Since esx does it on startup it is kinda fine, it still takes 3s to complete to select your entire table.

Which you should not do. Since esx is programmed that way, you will have to live with them.

You should just not have any slow queries while users are on the server. This indicates either a badly optimized table structure or very badly written mysql queries.


#569

Hi, it’s possible to connect the chat to player list trough mysql? i try to do it for a while…


#570

In the problem I have asked. I still can not find the cause. What is the problem?


#571

Can anyone help me with this problem?The server is completely new on windows but there is this error for the MySQL.


#572

You are not using mysql-async 3.0.7, it would tell you what is wrong. :wink:

use mysql_connection_string to set a proper connection string, e.g. like this:

set mysql_connection_string "addr=localhost;pwd=;database=essentialmode;uid=root"

#574

[MySQL] [Slow Query Warning] [EasyAdmin-MySQL] [74ms] CREATE TABLE IF NOT EXISTS
ea_bans( banid int(11) NOT NULL UNIQUE AUTO_INCREMENT, expire double NOT
NULL DEFAULT ‘10444633200’, identifier text NOT NULL, steam text NOT NULL, reason text NOT NULL, PRIMARY KEY(banid))
[MySQL] [Slow Query Warning] [esx_boatshop] [89ms] SELECT * FROM boat_categories

[MySQL] [Slow Query Warning] [esx_vehicleshop] [82ms] SELECT * FROM vehicle_cate
gories
[MySQL] [Slow Query Warning] [esx_addonaccount] [88ms] SELECT * FROM addon_accou
nt
[MySQL] [Slow Query Warning] [esx_eden_boatgarage] [105ms] UPDATE owned_boats SE
T state=true WHERE state=false
[MySQL] [Slow Query Warning] [es_extended] [85ms] SELECT * FROM items
[MySQL] [Slow Query Warning] [esx_addoninventory] [91ms] SELECT * FROM items
[MySQL] [Slow Query Warning] [esx_eden_aircraftgarage] [143ms] UPDATE owned_airc
rafts SET state=true WHERE state=false
[MySQL] [Slow Query Warning] [esx_datastore] [90ms] SELECT * FROM datastore
[MySQL] [Slow Query Warning] [esx_shops] [90ms] SELECT * FROM items
[MySQL] [Slow Query Warning] [esx_aircraftshop] [87ms] SELECT * FROM aircraft_ca
tegories
[MySQL] [Slow Query Warning] [esx_society] [93ms] SELECT * FROM jobs
[MySQL] [Slow Query Warning] [esx_eden_garage] [132ms] UPDATE owned_vehicles SET
state=true WHERE state=false
[MySQL] [Slow Query Warning] [statsonline] [147ms] UPDATE users SET online = 0
WHERE online = 1
hitch warning: frame time of 1180 milliseconds
AntiCheese (Anticheat) is up to date!
EasyAdmin (EasyAdmin) is up to date!

##############

DiscordBot

Current Version: 1.5.2

Newest Version: 1.5.2

Up to date!

##############

All users have been set to offline
[MySQL] [Slow Query Warning] [EasyAdmin-MySQL] [77ms] SELECT * FROM ea_bans
retrieved banlist
[MySQL] [Slow Query Warning] [esx_aircraftshop] [60ms] SELECT * FROM aircrafts
[MySQL] [Slow Query Warning] [esx_datastore] [68ms] SELECT * FROM datastore_data
WHERE name = ‘user_ears’
[MySQL] [Slow Query Warning] [esx_society] [77ms] SELECT * FROM job_grades
[MySQL] [Slow Query Warning] [esx_boatshop] [78ms] SELECT * FROM boats


#575

You can ignore most of the warnings on startup. But once users join the server, there should be no slow queries.

Up to the first 10 queries can be slower. Because the pool is building.

SELECT *

without a proper where is usually slow.

Also I do not feel like indexing your entire database.


#576

I need to adjust the search to find the fastest when there are many players online in the server.


#577

Update 3.0.8

  • Fixes mysql-async not parsing the BIT column, which I think only esx_ambulancejob uses.

#578

I have a problem when there are more players. Server not responding.


#579

How do I change from a SELECT * to a quick query?


#580

Ask the resource running the queries to improve their resources.


#581

Would you recommend me to switch from using * to specified From?

Started resource vVoice
Started resource wastedscreen
Started resource Weaponry
Started resource welcome
Started resource wnc
Started map first_spawn
Started resource first_spawn
Started resource synn-loadscreen
Started resource NativeUI
Started resource EasyAdmin
Started resource EasyAdmin-MySQL
Couldn’t find resource scrambler-vac.
Authenticating server license key…
Server license key authentication succeeded.cfx> Welcome!
Sending heartbeat to live-internal.fivem.net:30110

Current version: 5.0.3
Updater version: 5.0.3

Everything is fine!

executed table query
[MySQL] [Slow Query Warning] [esx_eden_aircraftgarage] [128ms] UPDATE owned_airc
rafts SET state=true WHERE state=false
[MySQL] [Slow Query Warning] [es_extended] [90ms] SELECT * FROM items
[MySQL] [Slow Query Warning] [EasyAdmin-MySQL] [112ms] CREATE TABLE IF NOT EXIST
S ea_bans( banid int(11) NOT NULL UNIQUE AUTO_INCREMENT, expire double NOT
NULL DEFAULT ‘10444633200’, identifier text NOT NULL, steam text NOT NULL,
reason text NOT NULL, PRIMARY KEY(banid))
[MySQL] [Slow Query Warning] [esx_eden_boatgarage] [128ms] UPDATE owned_boats SE
T state=true WHERE state=false
[MySQL] [Slow Query Warning] [esx_vehicleshop] [104ms] SELECT * FROM vehicle_cat
egories
[MySQL] [Slow Query Warning] [esx_addonaccount] [110ms] SELECT * FROM addon_acco
unt
[MySQL] [Slow Query Warning] [esx_addoninventory] [98ms] SELECT * FROM items
[MySQL] [Slow Query Warning] [esx_datastore] [96ms] SELECT * FROM datastore
[MySQL] [Slow Query Warning] [esx_boatshop] [129ms] SELECT * FROM boat_categorie
s
[MySQL] [Slow Query Warning] [statsonline] [145ms] UPDATE users SET online = 0
WHERE online = 1
[MySQL] [Slow Query Warning] [esx_shops] [97ms] SELECT * FROM items
[MySQL] [Slow Query Warning] [esx_society] [98ms] SELECT * FROM jobs
[MySQL] [Slow Query Warning] [esx_whitelis] [95ms] SELECT * FROM whitelist
[MySQL] [Slow Query Warning] [esx_aircraftshop] [100ms] SELECT * FROM aircraft_c
ategories
[MySQL] [Slow Query Warning] [esx_eden_garage] [167ms] UPDATE owned_vehicles SET
state=true WHERE state=false
hitch warning: frame time of 1295 milliseconds
EasyAdmin (EasyAdmin) is up to date!
All users have been set to offline
retrieved banlist
[MySQL] [Slow Query Warning] [esx_addoninventory] [55ms] SELECT * FROM addon_inv
entory
[MySQL] [Slow Query Warning] [esx_addonaccount] [63ms] SELECT * FROM addon_accou
nt_data WHERE account_name = ‘society_ambulance’
[MySQL] [Slow Query Warning] [esx_datastore] [60ms] SELECT * FROM datastore_data
WHERE name = ‘user_ears’
[MySQL] [Slow Query Warning] [esx_boatshop] [63ms] SELECT * FROM boats
[MySQL] [Slow Query Warning] [esx_aircraftshop] [64ms] SELECT * FROM aircrafts
[MySQL] [Slow Query Warning] [esx_society] [69ms] SELECT * FROM job_grades
Sending heartbeat to live-internal.fivem.net:30110
retrieved banlist
Sending heartbeat to live-internal.fivem.net:30110
Sending heartbeat to live-internal.fivem.net:30110
retrieved banlist
Sending heartbeat to live-internal.fivem.net:30110


#582

No because the issue is that they select the entire table at once. Kinda fails mysql as a storage solution.


#583

haha thanks for the fix


#584

I have to check the problem caused by my server. Not responding after several hours. Would you recommend me that the problem was not caused by mysql.


#585

mysql-async 3.0.x is pretty stable. If the issue is database related, it is usually because of badly written queries or badly optimizied tables.

Refer to

to find out what is causing hitches, and optimizing your database structure.


#586

Hey, I’m having an issue with this resource, I’ve checked the line number 20 in server.lua and as far as I can see it, the code there is correct, so I don’t know what’s happening, could someone help?

imagem


#587

Is this in your __resource.lua

'@mysql-async/lib/MySQL.lua'

loaded as a server script?