Does refreshing mysql query by jQuery ajax crashs the database?

MySQL is capable of serving hundreds of queries per second, even when running on low-end hardware However, you could still be "tiring" the database server, especially if you're running a very complex query, or if you do not have the necessary indexes on your tables. You may want to use the EXPLAIN syntax to see how MySQL is executing your query.

MySQL is capable of serving hundreds of queries per second, even when running on low-end hardware. However, you could still be "tiring" the database server, especially if you're running a very complex query, or if you do not have the necessary indexes on your tables. You may want to use the EXPLAIN syntax to see how MySQL is executing your query.

. Of course, if you're requesting the script running the mysql_query a lot it might result in a DoS (but normally it requires a very high amount of requests to bring down a server). EDIT: Your update states you're using setInterval() with 1 second.

It this case it depends on how many users will have that page open at the same time. E.g. Say 1000 Users are on that site - this would result in 60.000 Requests + Queries being fired every minute.

If your query is only a simple select it might not be a problem. If your doing a slow-query you might want to check the slow query log to improve your query - or alternatively change the behaviour of your script.

If not, it would be much better to cache the value server side once per second and use ajax to fetch this cached file rather than have all of your users simultaneously requesting the same data.

No it does not crash the database (how could it?). Of course, if you're requesting the script running the mysql_query a lot it might result in a DoS (but normally it requires a very high amount of requests to bring down a server). EDIT: Your update states you're using setInterval() with 1 second.

It this case it depends on how many users will have that page open at the same time.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions