I have problems with concurrent connections. How do i ensure that one query in ran just after another, without queries from another connections coming in between. I’ll probably need some kind of locking, but what kind? ..or? transactions?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Run the 2 queries in SERIALIZABLE isolation level – it guarantees that the result from the 2 queries is exactly the same as if they were the only 2 queries performed, by locking every record they access, but without locking the rest of the table/tables.