fivem-mysql-async icon indicating copy to clipboard operation
fivem-mysql-async copied to clipboard

Multirow insert?

Open benzon opened this issue 6 years ago • 2 comments

Hi, im trying to improve abit on some of ESX Datastore and addoninventory scripts and wondering if mulitirow insert is supportet.

Example

INSERT INTO test_table (name, description ) VALUE (value1, value2), (value3, value4), (value5, value6)

The current way in these scripts are terrible if there is a lot data, we tryed adding inventory for each appartment, but just having all the appartments in the database, and the current way is a loop, and ends up using a shit ton of connections, but thats with the older v2 version.

Not sure if the new version actually manages to close the connection after each insert, so we dont end up with 100-200+ connection from loops like that.

benzon avatar Sep 26 '18 14:09 benzon

I can look into adding a multirow insert command.

be aware that the current mysql-async can handle up to 1000-1500 requests per seconds, compared to the 350 - 450, 2.x was dying this is a big leap.

ghost avatar Sep 29 '18 14:09 ghost

Would be nice, especially for redundant insert tasks.

benzon avatar Sep 29 '18 19:09 benzon