Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 290
XCS Avatar asked Dec 30 '10 22:12

XCS


People also ask

How many connections can a MySQL server handle?

Simultaneous MySQL connection limits Each database user is limited to 38 simultaneous MySQL connections. This limitation helps to prevent overloading the MySQL server to the detriment of other sites hosted on the server.

How many queries can SQL handle?

By default, SQL Server allows a maximum of 32767 concurrent connections which is the maximum number of users that can simultaneously log in to the SQL server instance.

Can MySQL handle concurrent requests?

You may use one buffer table (Temporary table) in the sense of concurrency control with the help of LOCK'ing mechanism of MySQL. So while one request's to the server on the priority base you can set remains request as in queue or in the sense restrict the table.


3 Answers

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.

like image 164
Quassnoi Avatar answered Oct 14 '22 06:10

Quassnoi


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.

like image 34
Michael Goldshteyn Avatar answered Oct 14 '22 05:10

Michael Goldshteyn


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.

like image 1
stefgosselin Avatar answered Oct 14 '22 07:10

stefgosselin