17.11.2017, 20:37
Quote:
Yes, but mysql_tquery itself runs on another thread, so if you send a huge query it won't block server's thread like mysql_query does, it will still have one queue (well, mysql_query has no queue at all, it is "instant"), so if you send a huge query then a small query, the small query will be executed really late because the huge query is still being executed, but at least the main server thread won't be locked for a while (like mysql_query does). For multiple threads/queues you need to use parallel query.
I'd suggest to use mysql_pquery as much as possible, with at least a pool size of 4 (4 queues/connections for the mysql_pquery function). It will be fine as long as you don't think that it gets executed in order. Keep in mind that. |