CodeGuy
CodeGuy

Reputation: 28907

Performance of a website and MySQL

I have a PHP page that has some HTML and JavaScript mixed in. The majority of the file is JavaScript. The JavaScript shows some graphics on the screen, asks the user some questions, and records some data. It then inserts that data into a MySQL table.

Suppose I have 1000 people on this webpage at the same time. Suppose they all finish at the same time. Two questions

  1. Does having 1000 people versus 1 person slow down the script performance for any given person?

  2. Does having 1000 people inserting data into a MySQL table at the same time mean that I will lose lots of data?

Upvotes: 0

Views: 35

Answers (1)

Brad
Brad

Reputation: 163262

Yes, obviously doing 1,000 times the work at once means that there is a very high potential for hurting performance.

No, inserting data into MySQL 1,000 times at once doesn't mean you will lose data. MySQL takes care of all the concurrency issues when writing to disk.

Upvotes: 1

Related Questions