Questions tagged [multi-thread]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
129 views

SqlServer User and IP address auditing using Triggers + SESSION_CONTEXT – is this thread safe?

Problem We use a combination of triggers and values set in SESSION_CONTEXT to implement dta change auditing on our SqlServer database. Unfortunately, we have started to notice that the username and Ip ...
user1504505's user avatar
0 votes
1 answer
366 views

MySQL's atomic and thread safe nature

I understood that MySQL is thread-safe, which means that even though two threads trying to access the DB, it will be safe since there is a lock mechanism. But I like to ask one question, which you ...
Jin Lim's user avatar
  • 121
1 vote
1 answer
2k views

Race conditions. When 2 thread try to update in same entity in table [duplicate]

We all know that race condition is something we should avoid. We should not try to access the same variable or memory when using multiple threads. But I have some tricky cases. Let's say we have a ...
Jin Lim's user avatar
  • 121
0 votes
1 answer
304 views

Will an underpowered mirror host cause: The query processor could not start the necessary thread resources for parallel query execution [duplicate]

We recently moved our 2016 sql server mirror into Azure, but it's on an underpowered machine. Our main database server has 16 physical cores with hyper threading and 2 numa nodes. We have set the ...
TychoBrahe's user avatar
0 votes
1 answer
490 views

Why does insert on duplicate-key error create a share lock?

In the mysql docs is the following example for locking on insert: INSERT sets an exclusive lock on the inserted row. [...] If a duplicate-key error occurs, a shared lock on the duplicate index ...
Adam's user avatar
  • 137
0 votes
1 answer
239 views

How many operations SQL Server support per connection

I am making a multi threaded application in which I will use a single SQL Server connection and perform select, insert, update and delete. So once my application starts, it will open connection ...
Frank Martin's user avatar
2 votes
2 answers
5k views

How to calculate the max number of worker threads in SQL Server?

I use 64-bit OS with two CPUs (each of them makes 7 logical processors) and with total number of logical processors equal to 14. When I run this code I get 2048 SELECT max_workers_count FROM sys....
Rauf Asadov's user avatar
  • 1,233
1 vote
1 answer
1k views

MySQL: Performance issues in heavy multi-threaded environment

I have 23 of these tables in one database: CREATE TABLE foo1 ( DateTime datetime NOT NULL, BidOpen decimal(11, 5) NOT NULL, BidHigh decimal(11, 5) NOT NULL, BidLow decimal(11, 5) NOT NULL, ...
Peter VARGA's user avatar
1 vote
0 answers
151 views

GTID ignore error on parallel replication

Im getting an error in replication where GTID and parallel replications are enabled. Now I want to skip one transaction. I didn't find a way to do that. Last_SQL_Error: Worker 48 failed executing ...
TheDataGuy's user avatar
  • 1,860
2 votes
0 answers
579 views

How get process that is locking Database on SQLite?

I'm developing a iOS app using SQLite. I've got a class to manage SQL's operations, basically read, write and update. In many cases I get a SQLITE_BUSY error, so I want know which process is using the ...
Augusto's user avatar
  • 121
0 votes
1 answer
4k views

How can I disable database lock in sqlite with python?

I made a application in python and it should read and write simultaneously in multiple instances(multi CMD widows)(multi-threading). each thread is configured independently so it will not change the ...
mohammad fallah.rasoulnejad's user avatar
0 votes
1 answer
648 views

Deadlock error in inserting bulk of records to MySQL database using trigger and Qt multi threading

I have a multi thread program (In this case in Qt) which every thread at a specific time, inserts 500 records in a MySQL table (I call that as A_tbl) and also there is a trigger for A_tbl that inserts ...
user148061's user avatar
2 votes
1 answer
4k views

UNION Queries run in Parallel form or not

I have three tables and I want to select data from these three tables in parallel form to increase the performance. I'm running a query like this. SELECT * FROM table1 UNION ALL SELECT * FROM table2 ...
Azeem Haider's user avatar
5 votes
2 answers
3k views

Identity Column in Concurrency, Multithreading, Parallel Processing

Our company would like to understand the effects: If we have single table with Primary Key Identity column, int primary key IDENTITY(1,1), and the Application is conducting multi-threading parallel ...
user avatar
3 votes
1 answer
9k views

SQL Server Threads and Degree Of Parallelism

My understanding about SQL Server threads is that SQL Server breaks down an execution request within a session into several tasks and associates each task with a worker thread. So SQL Server always ...
user avatar
2 votes
6 answers
12k views

Run queries in parallel

I am running a sql script on mysql 5.7.18 ubuntu server 16.04 that does a large number of updates in one table. Each one of the 50k updates takes under a second but the total run time is very long (>...
rwms's user avatar
  • 201
3 votes
1 answer
732 views

MySQL, many writes waiting on disk i/o access

I'm seeing a disk i/o problem with a MySQL DB under the following scenario: 24 CPU's total on the computer 22 threads writing simultaneously to separate tables each write is done using INSERT INTO ......
ivor's user avatar
  • 31
4 votes
3 answers
296 views

Identify threads with maximum difference in time

I have many parallel executing queries in my SQL Server database. I need to find out queries where the difference in time for the longest thread and the shortest thread is high (excluding co-...
LCJ's user avatar
  • 899
2 votes
0 answers
1k views

MySQL queries waiting for other queries to finish

We have 30-40 different projects in Python and PHP that update, insert and select more than 1 million rows of data in MySQL DB every day. Currently we use InnoDB Engine for our tables. The problem: ...
Oleksandr's user avatar
9 votes
4 answers
4k views

How to get response from stored procedure before it finishes?

I need to return partial result (as simple select) from a Stored procedure before it is finished. Is it possible to do that? If yes, how to do that? If not, any workaround? EDIT: I have several ...
Bogdan Bogdanov's user avatar
0 votes
2 answers
3k views

Updating rows in tables concurrently using Multithreading in Java

I have an excel file with 50000 rows and I'm updating a MySQL table using hibernate by uploading that excel file from a Java Program. It is taking a huge time to update all the rows. Can it be ...
Codefool's user avatar
2 votes
1 answer
532 views

What does Oracle use for handling a client connection (process or thread)?

SQL Server 2016 and MySQL 5.7 use thread-based connection handling. PostgreSQL 9.5 uses one operating system process for each individual connection. According to Oracle 12c documentation it's not ...
Vlad Mihalcea's user avatar
0 votes
1 answer
1k views

Multi-threaded inserts vs serial

I have a large database application on SQL Server 2012 Standard Edition which receives data from hardware in chunks of 500-1000 (100 byte) rows every few seconds through a stored procedure. Would a ...
runamuk0's user avatar
  • 113
1 vote
1 answer
2k views

Multi-thread Informatica connections to use different processors on target database server

See this question for reference. Can data streams from Informatica to SQL Server be multi-threaded? I've got most of my problem figured out. I've split up the one large table into four smaller ...
Entree's user avatar
  • 2,072
2 votes
0 answers
164 views

Can data streams from Informatica to SQL Server be multi-threaded?

Suppose we have a database server, with SQL Server on it. And we are moving data from another database server, through our Informatica server, and onto that SQL Server database server. And our SQL ...
Entree's user avatar
  • 2,072