If I have 10 queries, and each query is updating a particular table (i.e., 10 different tables).
Can I open one mySQL connection, spawn 10 threads, each thread handles 1 query such that they can run concurrently instead of executing one by one.
Thanks!
No you can’t:
MySQL client library (at least native C one) is not thread safe to use same connection from different threads. You need to use a connection per thread.