Search code examples
mysqlmultithreadingconcurrencycomputer-sciencequery-optimization

Multithreading in MySQL?


Are MySQL operations multithreaded?

Specifically, on running a select, does the select (or join) algorithm spawn multiple threads to run together? Would being multi-threaded prevent being able to support a lot of concurrent users?


Solution

  • Several background threads run in a MySQL server. Also, each database connection is served by a single thread. Parallel queries (selects using multiple threads) are not implemented in MySQL.

    MySQL as is can support "a lot of concurrent users". For example Facebook started successfully with MySQL.