Abdel Ougnou
228 posts

Abdel Ougnou
@aougnou
I have been playing around with SQL Server since version 6.5. I can make your SQL Server faster and a lot better than it is today.
Washington, DC Katılım Şubat 2011
177 Takip Edilen25 Takipçiler

#sqlhelp how fast is it for a table with Billions of rows:
ALTER TABLE table1 SWITCH TO table2
English

--part1
with cte1 as(
SELECT ROW_NUMBER() OVER(ORDER BY (SELECT NULL)) as rn, Fridays = DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), n.num)
FROM (SELECT TOP 366 num = ROW_NUMBER() OVER(ORDER BY a.NAME)-1 FROM dbo.syscolumns a, dbo.syscolumns b) n
English

SELECT Fridays = DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), n.num) FROM (SELECT TOP 366 num = ROW_NUMBER() OVER(ORDER BY a.NAME)-1 FROM dbo.syscolumns a, dbo.syscolumns b) n WHERE DATENAME(weekday, DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), n.num)) = 'Friday'
English

@kevchant it says its working on:
Processed 130299320 pages for database 'VLdb', file 'PrdDt1' on file 1....
and it has to do a few of these files but because it's a 26TB DB it takes sometimes hours to complete this part after it has already reported Restore 100% complete
English

I track 26TB restore when it gets to 100% completed it keeps PROCESSING files and that takes hours to complete.
100 percent processed.
Processed 130299320 pages for database 'VLdb', file 'PrdDt1' on file 1......
How to track the second part? #sqlhelp #sqlfamily
English

@aougnou Hmm, sounds like a settings inheritance or object groups issue. Email S1 support and they'll help you figure out what's going on.
English

#sqlhelp I have created many alerts for long running query > 1 hr. in TSQL but I am having a hard time figuring out how to do it using #SentryOne. Any Blog posts or articles out there on how to do it? My Google-Fu is failing me on this one. Thanks in advance @SQLFamily.
English

@SQLsensei @SQLFamily The problem am having is that it's not responding to my threshold when I customize it to duration >= 30 minutes. It's still going by the default (I believe 1 hr. or 250%).
Top SQL: Duration Threshold Max
and [Event Duration.Total Minutes] Is greater than or equal to 30
English

@aougnou @SQLFamily It's easy - add the Top SQL: Runtime Threshold Max condition and a Send Email action. See here: #topsqlsource" target="_blank" rel="nofollow noopener">docs.sentryone.com/help/alerting-… and sentryone.com/blog/patrickke…
English

@AngelaTidwell that should be captioned: "Internals of Table Fragmentation How it Works".
English
Abdel Ougnou retweetledi

@Kevin3NF @GFritchey @cl @Kendra_Little @unclebiguns *cough* automation
and
scarydba.com/2020/03/24/bei…
😉
English

