php - How to increase MySQL INSERT performances? -


I have a program to gather information from many traders.

Every request from the merchant, my program is an INSERT query:

  INSERT stands for `good '(id, code, merchant, netcoast, ip) value (' ',' GC898 ',' Merchant Name ',' 581000 ',' 192.68.134.30 ');  

There are many requests from merchants at one time (more than 500 requests), so the MYSQL 500+ Insert query.

Is this a problem and how can I solve it with MYSQL?

This should not be a problem unless you are strapped for hardware (in this case its answer "Fast disk, more RAM, faster CPU" once you can verify which of the three obstacles on average ). If you use MyISAM tables, then using syntax, you can do "paper over" peaks (this is probably not worth it; syntax has been removed).

If you are doing this in batches (i.e. not putting a different customer at a line) then multiple INSERT s or even load data INFILE There will be a great help in a pinch, you can save them from a disco, or session (which is equivalent to the same thing) ... but an interpol ... (or maybe a small MEMORY In the table - but I will run some tests before resorting to it) and run the actual INSERT in the holidays.

I want to leave more optimization for later; "Optimizing timing is the root cause of all evils" "Anyway, you may be interested in (This is related to the last such esoteric mistakes, such as" The question is: What is Double Inodbie Buffer is enabled or it is better to use ext4 transaction log ).


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -