I have one process constantly insert into a sqlite3 database and another process select from the sqlite3 database(slow sql).
Does sqlite3 lock the database on reads?
I want make sure every write success. Read fail is acceptable.
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.
According to SQLite3 locking reference after start of transaction (BEGIN command), a SHARED lock will be acquired when the first SELECT statement is executed. Shared lock means that the database may be read but not written. A RESERVED lock will be acquired when the first INSERT, UPDATE, or DELETE statement is executed.