The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
11 views

PostgreSQL 9.3: Minimize locking when updating a large table with primary key

I am building a DB solution to handle a fast stream of online events. Each event UPSERTs a row in a location_update table, using its car_id primary key. Since there are very few new car_ids, the ...
3
votes
0answers
50 views

Which is the right way to fix “Error: 1205 Lock wait timeout exceeded; try restarting transaction”

I have a PHP script that sync a local DB against external datasource. Each time the script runs I perform some triggers on the DB where INSERT or UPDATE happen. These are the the triggers for that ...
0
votes
0answers
34 views

Is it a good idea to have too many named locks?

I am using MySQL as a data store and a Java App on the top. There are many state changes that happen, and I am seeing some concurrency bugs in there. I wanted to know if I can use named locks ...
0
votes
1answer
23 views

MySql Lock Tables Blocking Logic

The MySQL documentation (5.5) for Lock tables states: Let's say that I'm trying to lock table1 and table2 in a single query, but table2 is already locked. Will MySQL hold onto a lock on table1 and ...
2
votes
1answer
50 views

sp_GetAppLock slow performance unusual behaviour

We had a critical issue yesterday where by a 1 second stored procedure started to take minutes to execute. I don't know the business logic as of yet, however want to understand the impact of using ...
0
votes
0answers
20 views

Transaction block on coordinator

I tried to commad a procedure described here: http://files.postgres-xl.org/documentation/add-node-datanode.html We went as far as the third step, and everything was going perfect, but during the ...
0
votes
1answer
53 views

How to get number of locks acquired by my MySQL Query?

How to get number of locks acquired by my MySQL update query? Is it possible using MySQL Command Prompt or MySQL Workbench? Example query : update employees set store_id = 0 where store_id = 1;
0
votes
0answers
148 views

Removing locks in Oracle without being admin

3 wild sessions each got a row exclusive lock in the same table: SELECT * FROM DBA_DML_LOCKS; How can I remove the lock without being admin? If I was admin I would list (SID, SERIAL#) of the ...
1
vote
1answer
54 views

Write-lock a whole table during transaction

I need to perform a delicate operation to my table in which I will solely insert, delete and select upon all of my rows and no God may interfere with the table during this operation: the table will be ...
0
votes
1answer
74 views

CONCURRENT SELECT's SLOW … LOCK IN SHARE MODE

My Table has 25 Million rows total and 6 million rows satisfying below where clause. Select 1: select max(stamp) from Table where type = "string" LOCK IN SHARE MODE ; 6000+ seconds Select 2: ...
3
votes
1answer
92 views

Will dropping text column on SQL Server 2014 lock the table?

I have been tasked to drop a text column from a production SQL Server 2014 table. The table contains 61,683,821 records. Question: will dropping the column lock the table (or cause similar ...
0
votes
0answers
82 views

Getting Waiting for table metadata lock for select statements

I am using MySQL server 5.6.23 on CentOS and server configuration is like RAM - 32 GB Cores - 6 cores Innodb buffer pool size = 8 GB Key cache size = 2 GB We are using only select queries. But all ...
1
vote
1answer
97 views

Check for table lock in conditional statement [closed]

How can I make this work? IF( EXISTS (SHOW OPEN TABLES WHERE In_use < 2 and `Database` like 'MYDB' ) ) THEN -- DO SOMETHING END IF Context I want to run some sql statements inside a procedure, ...
0
votes
0answers
27 views

Waiting for table level lock - Info says NULL> What could be causing this lock?

This is from one of our Slave servers in a master-slave replication setup. What could be causing the locak mentioned in the 2nd line? Under info it shows only NULL. And it does not have anymore info ...
3
votes
2answers
81 views

New Index on table cause table to be locked really often

Here are my tables : CREATE TABLE [dbo].[Trackers] ( [IdTracker] INT IDENTITY (1, 1) NOT NULL, [IMEI] NVARCHAR (16) NULL, [CreationDate] ...
1
vote
2answers
386 views

Writing a large update/delete script that doesn't provoke locks

While running a T-SQL script that is performing massive amounts of deletes, I had the unpleasant experience of causing some sort of lock contention that prevented inserts of data in some tables for ...
2
votes
1answer
236 views

Do MongoDB's “read uncommit” and “write lock” conflict with each other?

I was reading the MongoDB documentation, where it says about read uncommit: MongoDB allows clients to read documents inserted or modified before it commits these modifications to disk, regardless of ...
1
vote
2answers
5k views

ORA-02049 and ORA-02063 Errors

Select For UPDATE NOWAIT is performed on a table by 20 processes in parallel The error below is returned by the 4 processes out of 20 (16 processes are successful) SQL_UPDATE_ERROR- : SQL update ...
2
votes
1answer
167 views

Oracle user locks (dbms_lock): guaranteed order of requests granted?

I was wondering if Oracle guarantees that the sequence of dbms_lock.request granted is the same as the sequence in which they were requested. In my tests it always was the case, but I couldn't find ...
1
vote
1answer
448 views

When tables are locked does MySQL queue queries?

I have a small production website, but it's live 24/7. When running the Optimize, Analyze or Repair commands, MySQL locks the table it is working on. QUESTIONS How would this effect users trying ...
1
vote
1answer
2k views

How to query-and-increase a value (counter) in a thread-safe way? (avoid race conditions)

In a table where each row has a counter (just an integer value), I need to get the current value and increase it at the same time. Effectively, I want to do this: SELECT counter FROM table WHERE ...
0
votes
1answer
317 views

Lock time not involved in MySQL slow query selection?

I wish to analyze some read-write contentions problems on a very huge table where writes are very fast, less than 1ms in most case. The point is that the contention makes those write queries sometimes ...
0
votes
0answers
1k views

Oracle Transaction recovery: lock conflict caught and ignored

In alert log there are a lot of "Transaction recovery: lock conflict caught and ignored" statements. I've found some information, that this error is caused when there is an active dead transaction. ...
2
votes
1answer
304 views

Can I limit the time a table lock is being held server side?

I have a SQL Azure server with some stored procedures with TABLOCKX hints that I call from C# code on a Windows Azure web role VM. I'm kinda paranoid about those hints - what if there's some network ...
0
votes
2answers
167 views

Should we explicitly lock MyISAM tables or is it implicit…?

Does MyISAM tables automatically lock a table for each select or insert statement .... I mean if I query the database as select * from tablename then does the MySQL engine first lock it for read ...
2
votes
1answer
1k views

mysql “Lock wait timeout exceeded” two transaction with different keys indexed

I have set of tables that I need to delete their records with a specific key and insert new records. Different transactions are used one for each key: Transaction 1: DELETE FROM table1 WHERE id=1; ...
0
votes
1answer
222 views

When and how would MyISAM concurrent insert = always be a problem?

I wish to set concurrent_insert to always on a MyISAM log table, so that inserts wouldn't have to wait for selects to perform when there are some holes in the table. We're talking about 10-20 inserts ...
0
votes
2answers
3k views

How to unlock a table in IBM DB2 Data Studio 3.1?

I know the process to unlock a table through IBM DB2 Control Center using activity monitor, but I am completely new to IBM DB2 Data Studio 3.1 Administrative Tool. Whenever i am right clicking on that ...
0
votes
1answer
3k views

mysql is locked; can't kill query

I have a mediawiki running on my local machine and just started running mysqldump last night: $ mysqldump -h localhost -u wikiuser --default-character-set=UTF8 wikidb --add-locks ...
1
vote
1answer
960 views

MySQL - Export two columns from large table without causing a lock

I am a sysadmin who doesn't do a ton of dba stuff. For a project, I have access to a production server--which I am not the sysadmin for--with an enormous 40,000,000 row >10 GB MySQL InnoDB table. I ...
0
votes
1answer
187 views

How do I stop a query from running if the row is locked?

I have a section of code that locks the database, updates it and then confirms. This is all working fine, if another user attempts to update the same row they cannot and their changes are discarded. ...
3
votes
1answer
1k views

Database locked

I canceled a query which took too long time. After that, the SQL-Server database was locked. After I restarted SQL Server, the mode of my database was "in recovery". Now I can't access my database ...
6
votes
1answer
727 views

Deadlock graph with a lock on an index on a seemingly unrelated table

I have a deadlock graph from a deadlock where one process is doing a SELECT and one is doing an UPDATE. This seems like the classic case where the SELECT gets a NCI lock to perform a join and then a ...
1
vote
1answer
184 views

SQL Server 2008 - get current LOCK_ESCALATION on particular table

Is there a way to find the current setting for LOCK_ESCALATION on particular table? Can it be found through system views?
2
votes
1answer
779 views

Sql server update query locking stages?

Looking at update MyTable set Status = 1 where Status = 0 of course- the where is calculated before the actual update. but does this filtering (where Status = 0) is also inside the lock ? I mean ...
1
vote
2answers
2k views

jdbc+mysql: “Deadlock found when trying to get lock; try restarting transaction”

After recovering from a disk-full problem, I started getting these errors in my logs: java.sql.BatchUpdateException: Deadlock found when trying to get lock; try restarting transaction at ...