Questions tagged [queue]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
2answers
145 views

Why is our query suddenly returning rows it should not (using READPAST and UPDLOCK options)?

We have a job table that looks like this CREATE TABLE [dbo].[Clearing]( [Skey] [decimal](19, 0) IDENTITY(1,1) NOT NULL, [BsAcctId] [int] NULL, [Status] [varchar](20) NULL, CONSTRAINT ...
4
votes
1answer
80 views

How can I limit SQL Server Agent's simultaneous jobs number?

I'm looking for a setting (other than schedules shifting) which could limit the number of jobs running simultaneously. I have 844 jobs in my SQL Agent (SQL Server 2017 Enterprise). Most of them needs ...
0
votes
0answers
59 views

Automating Alerting on Blocking with Queues and Event Notifications [duplicate]

I need to automate email notifications on blocking on some SQL 2016 servers. I have had a look at running a job through the SQL agent but seems hack n slash. I found an alternative method online that ...
0
votes
2answers
44 views

Best Database specifications for my IOT solution

i'm working on a IOT environment that basically is a sensor that can measure more then 300 times a second. We receive this measurements remotely using MQTT protocol. I want to set up a painel where i ...
2
votes
0answers
44 views

How should I configure a table to optimize for frequent inserts and deletes?

I know about making the clustered index a steadily increment field, like a datetime field. So that will give me fast inserts. However, the deletes will be based on a consumer of the "queue". So the ...
1
vote
1answer
55 views

Is this table-backed-queue implementation safe?

We've a system where kinds of orders should be processed in batches, by advancing them from Status 0 to Status 1. There's a max number of a particular kind of order we can process in any one go, and ...
0
votes
1answer
24 views

Row inserted to DB in main app is not available in the different process. Can MySQL defer some queries?

I have such problem. My main app process some request and insert the new row into DB, then send an Event to the queue. I have the different process that listens on that queue and when he get details ...
0
votes
1answer
383 views

How to persist messages in Postgresql's LISTEN/NOTIFY? [closed]

If I send notifications before starting to listen i.e. notify test, 'test message'; listen test; I loose that notifications. How can I persist them for later fetching? Actually, I need this ...
2
votes
1answer
81 views

How do I determine what is activating my SQL service broker proc?

I have several queues. One of which has suddenly started acting oddly. It activates repeatedly while nothing is in it's queue. I even manually removed old conversations and this thing is still ...
16
votes
2answers
12k views

Postgres Listen/Notify As Message Queue

Is there any way to use Postgres Listen/Notify feature to deliver a message to a channel and have only one listener consume this message? The purpose for this is that I have multiple 'worker' apps ...
1
vote
1answer
584 views

Database table as a queue, order by another table's column

I have two tables. One table serves as the queue from which multiple users simultaneously dequeue items one at a time, by flagging the item's row. The other table is joined and used for ordering. It ...
11
votes
1answer
13k views

Automatic aging-out (deletion) of old records in Postgres

Does Postgres have any features to support aging-out old records? I want to use Postgres for logging, as a sort of queue, where records (log events) older than two weeks are automatically deleted.
7
votes
1answer
2k views

No service broker active on database

I am trying to set up query notification however when I try to create a queue and service I get the error 'There is no Service Broker active in the database. Change to a database context that contains ...
1
vote
0answers
371 views

oracle AQ for scheduled jobs

We have a process that currently uses the Oracle DBMS_SCHEDULER to execute. The process runs every time the backend receives data from an external device. The Oracle scheduler is set up such that a ...
8
votes
3answers
13k views

Best way to implement concurrent table based queue

I have a table in MySQL that represents a queue of links to be processed. The links are processed by an external app, one by one, and deleted in the end. This is a high volume queue and I have ...
3
votes
1answer
703 views

Work queue with complex select and long processing: Ensuring concurrency

I have a queue table from which worker processes claim records, one at a time. It is crucial that no two workers claim same item to process. Normally this kind of thing is done with select top (1) ......
74
votes
1answer
55k views

Postgres UPDATE … LIMIT 1

I have a Postgres database which contains details on clusters of servers, such as server status ('active', 'standby' etc). Active servers at any time may need to fail over to a standby, and I don't ...
1
vote
1answer
923 views

Retrieve next queue item

I have a simple table in SQL Server 2012 which implements a processing queue. As data has been inserted the query to retrieve the next item has gone from <100ms to a constant 5-6secs. I would be ...
0
votes
0answers
139 views

Efficient way to fetch/update X records in a loop

What I need is a simple process that handles requests. I have setup a simple table as follows: CREATE TABLE Requests ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, request_param VARCHAR(250) ...
7
votes
1answer
2k views

Recommendations on how to organize Queues in Service Broker

I have a service broker application that currently has 5 or 6 queues on two servers. The general workflow is: Server A User populates some tables User fires stored proc which puts a message into ...
2
votes
1answer
337 views

Schema for multiple identical queue tables

I am migrating a message processing application that was built on MSMQ to SQL Server 2012 (preferably Standard Edition). Messages are received and distributed via TCP/IP endpoints and the typical ...
2
votes
0answers
85 views

Optimizations for new SQL Server 2000 database that will act as email queue AND API database

Due to limitations put on me I've got to put my outgoing Email Queue in the same database as my customer information. What are some optimizations I can make, specifically to the Email portion that ...
15
votes
2answers
16k views

FIFO queue table for multiple workers in SQL Server

I was attempting to answer the following stackoverflow question: What SQL Server 2005/2008 locking approach should I use to process individual table rows in multiple server application instances? ...