How many MySql queries/second can be handled by a server?

24,765

Solution 1

Yoshinori Matsunobu in one of his articles claims 105,000 queries per second using SQL, and 750,000 queries per second using native InnoDB API.

All queries are simple PK lookups.

On a shared hosting these numbers will of course be much lower. How much exactly of course depends on the shared hosting.

Solution 2

This is completely dependant on the server hardware, it's caching ability and configuration, and the type of hardware it uses for non-volatile storage (e.g., a RAID array of hard drives with spindles or SSDs?), not to mention the type of query and database being queried, including:

  • Number of joins
  • Indexes
  • Number of rows in the tables queried
  • Size of the result set
  • Concurrent load
  • etc...

Without knowing all of these factors, it is impossible to estimate performance. The best estimate comes from actual profiling, performed under normal operating conditions with the type of queries that will actually be presented.

Solution 3

Many factors can influence the response time of a database. Hardware, application configuration, (mysql out of the box does not perform all that well), and last but not least, your coding!

Badly written queries can bring make an app feel slow and sluggish. Using count(*) in your code, for a very trivial example, or having no indexes on the database, for example, will influence your db response time as your dataset grows.

Share:
24,765
XCS
Author by

XCS

Algorithms are fun. UX is sublime. JavaScript is the one. Ping-pong to pass time. userTrack.net - Self Hosted Analytics Platform

Updated on July 05, 2022

Comments

  • XCS
    XCS almost 2 years

    I've started developing a browser (database) game. My question is how many queries can a regular hosting handle (when I mean regular, I mean a shared hosting you cand find for about 7$/month). As for the queries, nothing complicated (simple SELECT and WHERE operations).

    So... ? 10? 100 ? 10000?

  • XCS
    XCS over 13 years
    An estimation? I mean how many users can register and play the game. (if there are x users, i'll have like 5 tables with x rows). The queries are simple SELECT WHERE ones, and the server is what the average hosting company offeres...
  • Michael Goldshteyn
    Michael Goldshteyn over 13 years
    That is not nearly enough information to answer the question. There are a lot of hardware and software factors that come into the equation. Your best bet is not to ask the question, but to measure actual performance with your load (i.e., to profile).