Skip to content Skip to sidebar Skip to footer
Showing posts with the label Locking

Using With Nolock Table Hint In Query Using View - Does It Propagate Within The View?

If a 'WITH NOLOCK' query hint is used on a View in SQL Server, does it propagate that hint … Read more Using With Nolock Table Hint In Query Using View - Does It Propagate Within The View?

Postgres, Update And Lock Ordering

I'm working on Postgres 9.2. There are 2 UPDATEs, each in their own transactions. One looks li… Read more Postgres, Update And Lock Ordering

"the Total Number Of Locks Exceeds The Lock Table Size" Deleting 267 Records

I'm trying to delete 267 records out of about 40 million. The query looks like: delete from pr… Read more "the Total Number Of Locks Exceeds The Lock Table Size" Deleting 267 Records

How I Make Result Of Sql Querys With Limit Different In Each Query?

I have the following SQL: SELECT id, url FROM link WHERE visited = false ORDER BY id LIMIT 500… Read more How I Make Result Of Sql Querys With Limit Different In Each Query?

Update Mysql Table In Chunks

I am trying to update a MySQL InnoDB table with c. 100 million rows. The query takes close to an ho… Read more Update Mysql Table In Chunks

Using Sql Server As Resource Locking Mechanism

Given a table of logical resource identifiers (one per row), what is the best way for an arbitrary … Read more Using Sql Server As Resource Locking Mechanism

Timeout On Advisory Locks In Postgresql

I'm migrating from ORACLE. Currently I'm trying to port this call: lkstat := DBMS_LOCK.REQU… Read more Timeout On Advisory Locks In Postgresql

How To Handle Concurrent Inserts Into Db Causing Violation Of A Rule For The Records In The Database?

We have a CARD table that stores card number and user account number. Only a max of two users can s… Read more How To Handle Concurrent Inserts Into Db Causing Violation Of A Rule For The Records In The Database?

How To Find The Table Names Which Are Locked (specific To Any Transaction)

Is there any way to list out the locked tables and to kill the transactions if we want them to be u… Read more How To Find The Table Names Which Are Locked (specific To Any Transaction)

Is Join Insert/update On Mysql An Atomic Operation?

In a Mysql database with every table based on InnoDB with Autocommit enabled, will queries with sub… Read more Is Join Insert/update On Mysql An Atomic Operation?

Oracle Locking With Select...for Update Of

I'm selecting from tables FOO and BAR. I'd like to lock the records of FOO which are being… Read more Oracle Locking With Select...for Update Of

Is Insert ... Select An Atomic Transaction?

I use a query like this: INSERT INTO table SELECT * FROM table2 t2 JOIN ... ..… Read more Is Insert ... Select An Atomic Transaction?

Correct Way To Take A Exclusive Lock

I am writing a procedure that will be reconciling finical transactions on a live database. The work… Read more Correct Way To Take A Exclusive Lock

Why Does Row Level Locking Not Appear To Work Correctly In Sql Server?

This is a continuation from When I update/insert a single row should it lock the entire table? Here… Read more Why Does Row Level Locking Not Appear To Work Correctly In Sql Server?

Using Sql Db Column As A Lock For Concurrent Operations In Entity Framework

We have a long running user operation that is handled by a pool of worker processes. Data input and… Read more Using Sql Db Column As A Lock For Concurrent Operations In Entity Framework

Avoiding Concurrency Problems With Max+1 Integer In Sql Server 2008... Making Own Identity Value

I need to increment an integer in a SQL Server 2008 column. Sounds like I should use an IDENTITY … Read more Avoiding Concurrency Problems With Max+1 Integer In Sql Server 2008... Making Own Identity Value

Mysql Deadlock Explanation Needed

I received the following deadlock log via 'SHOW INNODB STATUS'. Can someone care to explain… Read more Mysql Deadlock Explanation Needed

What's The Default Lock Granularity In Sql Server?

I've thoroughly read MSDN about table hints and I don't seem to find the locking granularit… Read more What's The Default Lock Granularity In Sql Server?

Make Innodb Only Lock The Row Currently Being Updated?

Building on the query in this answer (please note/assume that the GROUP_CONCATs are now also held i… Read more Make Innodb Only Lock The Row Currently Being Updated?

What Resource Does A Key Lock Actually Lock?

I know a key lock locks a key in an index. However, what does 'key' actually mean? For e… Read more What Resource Does A Key Lock Actually Lock?