Delay in executing a file

0

I have a cents auction script, and there is a PHP file that is responsible for entering the customer's bid when the button is clicked.

That is, when the customer clicks the button to bid, it triggers this file and inserts the bid into the product, which is registered in the DB.

What is happening is that sometimes it takes too long to enter the bid, which should be done instantly, sometimes it takes about 30 seconds to insert.

Is there anything I can do to improve this?

Follow the complete file: link

A friend told me to use indexes, but I read in a forum the following:

  

"indexes increase recovery speed, but reduce   speed of insertions and deletions, as well as updates of   values in indexed columns. This means that   slow most transactions involving writing. "

So that would not be the case right?

    
asked by anonymous 26.01.2018 / 02:13

0 answers