Welcome Guest, Not a member yet? Register   Sign In
Lock contention using ci_session (auth_lib) and MySQL
#2

[eluser]Las3r[/eluser]
locks are usually caused by 'too many' reads (that either do a page lock, or a row lock). The page locks are the 'assholes' here, they put the rest of the queries on-hold.

Perhaps you could try indexing the table (set a primary key?), and add some indexes, so that mysql knows where to find 'entries' so it doesnt have to lock the whole table in order to find something.

In mssql we use "select xxx from yyy with (NOLOCK) where zzz=zyzy", the - with (NOLOCK) - prevents the table from being locked, and forces the DBMS to read-only. google it to make sure it works for mysql, i can't verify that.

My experience with mysql is rather limited, i mostly use MSSQL for my applications, but I hope it helps...


Messages In This Thread
Lock contention using ci_session (auth_lib) and MySQL - by El Forum - 03-03-2009, 09:33 AM
Lock contention using ci_session (auth_lib) and MySQL - by El Forum - 03-03-2009, 02:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB