Posts: 71
Threads: 15
Joined: Feb 2015
Reputation:
0
May I ask what is the difference between these two native MySQL plugin functions: mysql_tquery and mysql_pquery.
Posts: 56
Threads: 13
Joined: Feb 2014
Reputation:
0
thats a good question .. the difference is the speed .. mysql_pquery is faster, however it depends on how many connections you have (how many databases are connected at the same time) .. anyway both of them have the same effects: execute a query and triggers a callback may also send some values to the callback (playerid or whatever).
P.S: I'm not sure if thats the only difference but atleast I'm sure of that.
Posts: 71
Threads: 15
Joined: Feb 2015
Reputation:
0
Thanks for the answer, Boyka96. However, is there anyone with a better answer?
Posts: 889
Threads: 4
Joined: Mar 2013
Reputation:
0
Pquery:
Sends a query which will be executed in another thread concurrently and calls the callback (if there is one) when the execution is finished.
Tquery:
Sends a query which will be executed in another thread and calls the callback (if there is one) when the execution is finished
Difference:
The difference between mysql_pquery() and mysql_tquery() is, that this pquery uses multi-threading, thus it's faster depending on how many connections are used. The number of connections can be specified in mysql_connect() through the pool_size parameter. Each connection resembles a thread.