tquery vs pquery
#1

May I ask what is the difference between these two native MySQL plugin functions: mysql_tquery and mysql_pquery.
Reply
#2

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.
Reply
#3

Thanks for the answer, Boyka96. However, is there anyone with a better answer?
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)