A feature is not executed during the execution of some of the statements sporadically

Source: Internet
Author: User
Do a function, there is a form, the user entered the phone number and the amount submitted to the background through a series of processing, if the processing is successful, will write a record to the database, the record has a field of result if result=100 wrote the SQL Statement Update 3 table 3 states, One problem is that sometimes even if the RESULT=100 subsequent SQL statements do not seem to be executed or updated, this form has many concurrent cases submitted by the user, the feeling is not in the concurrency, please ask everyone may be what reason


Reply to discussion (solution)

Obviously, you didn't fix the fault tolerance mechanism.
You should check for errors after all possible failed operations and determine the direction of the program
If the number of concurrent numbers is too high, consider using the transaction

Use the transaction, so that every step can be successfully executed. If one step is unsuccessful, roll back.

Thank you for your enthusiastic answer, but all of the table types are MyISAM and do not support transactions, but if you change the table type, some searches are very slow, causing the query data to time out

Yes, using a transaction slows down the query and unnecessarily does not use the
Whether or not to use a transaction, it is always necessary to make a mistake

Thank you for your enthusiastic reply.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.