thub.users.profile.tabs.comments.personalized


Hi Mona,

This is for Azure SQL DB, scheduling jobs using Elastic job agents.

Don't think what you suggested will work for Azure SQL DB.

Thanks again.



Those parameters are ones within the stored procedure [Weekly_Data_Purge]

I was wondering how I could pass them to jobs.sp_add_jobstep

Thank you for the reply @AnuragSharma-MSFT

Please refer this stored procedure. This will run at least for an hour.

Create Procedure RebuildIndexes
as
ALTER INDEX [nci_Status_Id] ON [dbo].[Queue] REBUILD WITH(ONLINE=ON,MAXDOP=1);
ALTER INDEX [PK_dbo.Queue] ON [dbo].[Queue] REBUILD WITH(ONLINE=ON,MAXDOP=1);
ALTER INDEX [PK_dbo.TransID] ON [dbo].[TransID] REBUILD WITH(ONLINE=ON,MAXDOP=1);
ALTER INDEX [IX_Queue_Id] ON [dbo].[TransID] REBUILD WITH(ONLINE=ON,MAXDOP=1);
ALTER INDEX [nci_code_time] ON [dbo].[TransID] REBUILD WITH(ONLINE=ON,MAXDOP=1);
ALTER INDEX [PK_dbo.Details] ON [dbo].[Details] REBUILD WITH(ONLINE=ON,MAXDOP=1);
ALTER INDEX [nci_wi_Queue_D] ON [dbo].[Queue] REBUILD WITH(ONLINE=ON,MAXDOP=1);
ALTER INDEX [IX_Id] ON [dbo].[Queue] REBUILD WITH(ONLINE=ON,MAXDOP=1);
ALTER INDEX [PK_dbo.TransactionID] ON [dbo].[TransationSummary] REBUILD WITH(ONLINE=ON,MAXDOP=1);
ALTER INDEX [PK_dbo.DetailsID] ON [dbo].[DetailsSummary] REBUILD WITH(ONLINE=ON,MAXDOP=1);

Thank you @AnuragSharma-MSFT

I am not quite familiar with Azure functions, I need to read through to get a better understanding.
On searching earlier, it appears there is a limit of 10 minute time out in Azure functions, I am not sure though.

My only peeve is the 2 minute timeout limit in Azure logic app. Otherwise, I thought Logic app is really user friendly to use.

Thanks again for your time, much appreciated.

Thank you Mike, I checked with my application team, and they used this link which appears to generate sequential ID on the GUID column

http://davecallan.com/generating-sequential-guids-which-sort-sql-server-in-net/

I didn't have to make any changes on the DB side like enforcing the newsequentialid()

Do I still need to run this command on the DB side?

ALTER TABLE [dbo].[Scan] ADD DEFAULT (newsequentialid()) FOR [Id]
GO

Thanks for your time and response. Much appreciated.

Thank you Mike, I should have clarified.

We removed the below constraint as part of the testing
ALTER TABLE [dbo].[Scan] ADD DEFAULT (newsequentialid()) FOR [Id]
GO

We noticed once the application team applied the code changes on their end, the GUIDs were sequential.
We didn't have to create the constraint after that.

Seems to be working.

No, thanks Mike. I am happy with the answers :-)

thank you again for your detailed explanation.

I learnt a lot :)

Thanks, I tried this approach and this appears to have slowed down IO considerably as usually around 2 million records get loaded in this table per day. Overall system performance has improved

Thank you, I have provided additional details

Thank you for your reply. Very useful suggestions indeed.

I can see that this table has two columns below. I think I can consider using one of them as a non-unique clustered index.
I have few proposals to provide my team :-)
But out of curiosity, why not a unique clusteredindex on the timestamp?
Also, is there chances of fragmentation if we use timestamp as non unique clusteredindex as the data type is date time


EventDate
Eventtime

Thank you @pituach

This is a primary key clustered. I just got handed over this system for review yesterday.

The primary key is on an uniqueidentifier