We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various queries are not ideally constructed resulting the SQL query cache misses.
Delayed queue table:
(@Headers nvarchar(1362),@Body varbinary(177),@DueAfterDays int,@DueAfterHours int,@DueAfterMinutes int,@DueAfterSeconds int,@DueAfterMilliseconds int) DECLARE @NOCOUNT VARCHAR(3) = 'OFF'; IF ( (512 & @@OPTIONS) = 512 ) SET @NOCOUNT = 'ON' SET NOCOUNT ON; DECLARE @DueAfter DATETIME = GETUTCDATE(); SET @DueAfter = DATEADD(ms, @DueAfterMilliseconds, @DueAfter); SET @DueAfter = DATEADD(s, @DueAfterSeconds, @DueAfter); SET @DueAfter = DATEADD(n, @DueAfterMinutes, @DueAfter); SET @DueAfter = DATEADD(hh, @DueAfterHours, @DueAfter); SET @DueAfter = DATEADD(d, @DueAfterDays, @DueAfter); INSERT INTO [NsbSamplesSqlOutbox].[receiver].[Samples.SqlOutbox.Receiver.Delayed] ( Headers, Body, Due) VALUES ( @Headers, @Body, @DueAfter); IF(@NOCOUNT = 'ON') SET NOCOUNT ON; IF(@NOCOUNT = 'OFF') SET NOCOUNT OFF;
Queue table:
(@Id uniqueidentifier,@TimeToBeReceivedMs int,@Headers nvarchar(734),@Body varbinary(max) ) DECLARE @NOCOUNT VARCHAR(3) = 'OFF'; IF ( (512 & @@OPTIONS) = 512 ) SET @NOCOUNT = 'ON' SET NOCOUNT ON; INSERT INTO [NsbSamplesSqlOutbox].[receiver].[Samples.SqlOutbox.Receiver] ( Id, Recoverable, Expires, Headers, Body) VALUES ( @Id, 1, CASE WHEN @TimeToBeReceivedMs IS NOT NULL THEN DATEADD(ms, @TimeToBeReceivedMs, GETUTCDATE()) END, @Headers, @Body); IF (@NOCOUNT = 'ON') SET NOCOUNT ON; IF (@NOCOUNT = 'OFF') SET NOCOUNT OFF; (@Id uniqueidentifier,@TimeToBeReceivedMs int,@Headers nvarchar(800),@Body varbinary(max) ) DECLARE @NOCOUNT VARCHAR(3) = 'OFF'; IF ( (512 & @@OPTIONS) = 512 ) SET @NOCOUNT = 'ON' SET NOCOUNT ON; INSERT INTO [NsbSamplesSqlOutbox].[sender].[Samples.SqlOutbox.Sender] ( Id, Recoverable, Expires, Headers, Body) VALUES ( @Id, 1, CASE WHEN @TimeToBeReceivedMs IS NOT NULL THEN DATEADD(ms, @TimeToBeReceivedMs, GETUTCDATE()) END, @Headers, @Body); IF (@NOCOUNT = 'ON') SET NOCOUNT ON; IF (@NOCOUNT = 'OFF') SET NOCOUNT OFF; (@Id uniqueidentifier,@TimeToBeReceivedMs int,@Headers nvarchar(800),@Body varbinary(max) ) DECLARE @NOCOUNT VARCHAR(3) = 'OFF'; IF ( (512 & @@OPTIONS) = 512 ) SET @NOCOUNT = 'ON' SET NOCOUNT ON; INSERT INTO [NsbSamplesSqlOutbox].[sender].[Samples.SqlOutbox.Sender] ( Id, Recoverable, Expires, Headers, Body) VALUES ( @Id, 1, CASE WHEN @TimeToBeReceivedMs IS NOT NULL THEN DATEADD(ms, @TimeToBeReceivedMs, GETUTCDATE()) END, @Headers, @Body); IF (@NOCOUNT = 'ON') SET NOCOUNT ON; IF (@NOCOUNT = 'OFF') SET NOCOUNT OFF; (@Id uniqueidentifier,@TimeToBeReceivedMs int,@Headers nvarchar(800),@Body varbinary(max) ) DECLARE @NOCOUNT VARCHAR(3) = 'OFF'; IF ( (512 & @@OPTIONS) = 512 ) SET @NOCOUNT = 'ON' SET NOCOUNT ON; INSERT INTO [NsbSamplesSqlOutbox].[sender].[Samples.SqlOutbox.Sender] ( Id, Recoverable, Expires, Headers, Body) VALUES ( @Id, 1, CASE WHEN @TimeToBeReceivedMs IS NOT NULL THEN DATEADD(ms, @TimeToBeReceivedMs, GETUTCDATE()) END, @Headers, @Body); IF (@NOCOUNT = 'ON') SET NOCOUNT ON; IF (@NOCOUNT = 'OFF') SET NOCOUNT OFF;
Subscriptions:
(@Topic_0 varchar(14),@Topic_1 varchar(13),@Topic_2 varchar(18),@Topic_3 varchar(20)) SELECT DISTINCT QueueAddress FROM [NsbSamplesSqlOutbox].[dbo].[Subscriptions] WHERE Topic IN (@Topic_0, @Topic_1, @Topic_2, @Topic_3)
This was discovered while working on the following SQLP PR:
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the suggested improvement
Various queries are not ideally constructed resulting the SQL query cache misses.
Delayed queue table:
Queue table:
Subscriptions:
Related
This was discovered while working on the following SQLP PR:
Additional Context
No response
The text was updated successfully, but these errors were encountered: