« first day (4286 days earlier)      last day (574 days later) » 

12:46 AM
SQL Server 2019 CU 18 is out. The only interesting fix is for unexpected locking on the columnstore dictionary under RCSI and READ UNCOMMITTED
 
1:09 AM
The NOLOCK hint KB under it is also of interest
I made some ineffective SEO optimizations that list me as the last updated author, but it’s Joe’s post.
 
Yes I remember that and reported the details in December. Glad they fixed it eventually
 
10 month lag time eh
 
@ErikDarling Same issue though. Don't understand why it's listed twice. Intern paid by the line?
 
Maybe it requires two commits
 
@ErikDarling It's not unusual, sadly
 
1:17 AM
Is Tom Jones the summer intern
 
@ErikDarling ah yes two minutes to make the commits, ten months to resolve the merge conflicts
@ErikDarling very glad you picked up on that
I wonder when they'll fix those tvf deadlocks
 
They got on the generate_series one quickly
 
Good news for the early-adopters
 
Maybe they’ll learn. something from it
 
2:11 AM
Up skilling in progress
 
2:25 AM
Better off upskilling in Postgres
 
3:10 AM
@PaulWhite Tried is the right word, yeah.
 
 
2 hours later…
4:52 AM
😀
 
5:31 AM
Morning
 
6:02 AM
Morning
 
6:24 AM
When you're around @SeanGallardy-MostlyRetired, how do you debug the HARD_SYNC_COMMIT wait?

I wanted to ask here, but the comments are closed.
https://www.seangallardy.com/understanding-the-hadr_sync_commit-wait/
 
 
2 hours later…
8:12 AM
A chairde - Morning all!
I'm blue in the face from writing (for schema design questions) that "it's an iterative process" and that one has to "a) design your schema, b) programme against it, c) fix errors (and there will be errors) or start again, d) rinse and repeat". Is there any way that we can have a generic schema design answer to which we can point people?
 
This one?
1
Q: Unique Constraint on 2 columns or single column and null exists

JustinWithin a multi-tenant database we have a table that contains some system values and some tenant values defined as follows. CREATE TABLE [dbo].[ItemTypes] ( [Id] INT IDENTITY PRIMARY KEY , [TenantId] INT NULL , [SystemType] BIT NOT NULL , [Name] ...

 
8:28 AM
@Vérace No, because different people will have different views on the 'correct' process to follow. Yours is one way.
Whichever high-level design process one prefers, there are often unique design features making specific questions and answers useful.
It's also possible to have useful generic Q &A. We have a few already, including:
3
Q: Understanding data abstraction levels

user2804064The three-level ANSI SPARC Database Architecture suggests three data abstraction levels, namely, external, conceptual, and internal levels. If I understand correctly, the external level represents the users' views, the conceptual level is the conceptual diagram (ER model), and the internal level...

 
 
2 hours later…
10:20 AM
Naming things at MS seems hard
 
10:38 AM
Well naming things once anyway
 
11:05 AM
> I don’t work at Microsoft, so I can’t tell you why they are different. In some cases it was simply because they dropped a prefix for readability but the internal maps didn’t change and XEvents loads the C++ header file into the map, so you get the internal values and not the translated one from dm_os_wait_stats.
 
11:21 AM
prefix or suffix or midfix or random change
I liked this one
PREEMPTIVE_FSRECOVER_UNCONDITIONALUNDO to PREEMPTIVE_FSRECOVER_CONDITIONALUNDO
 
UNEMPTIVE
 
11:59 AM
UPDATE U
SET U.Id = U.rn
FROM
(
    SELECT
        T.Id,
        rn = ROW_NUMBER() OVER (
            ORDER BY T.Id DESC)
    FROM #tmp AS T
) AS U;
Derived table or subquery?
 
table expression
 
Sure
But would you really call it that in normal speech
"The table expression U"
The czechsums post made me laugh btw
 
subquery. Fewer syllables
 
yeah I guess
 
@PaulWhite Hard part was finding any notes. I went cashless some time ago
 
12:05 PM
The government use your cards to spy on you, you know
I read that on the internet
Banknotes are pretty, but also filthy
 
@PaulWhite must be true then
 
Yep they're all my friends and would never lie to me
Unless it was in my own best interests, perhaps
Point is, they're the good guys
They said so
I really do like banknotes though. It's the fiddly little coins I can't stand.
In the old times, men would carry a purse.
Maybe I should try that.
 
coin pouch
 
not a kangaroo
 
The problem with banknotes is that if you pay, they give you change back in coins
 
12:14 PM
Exactly so
 
which I usually offload to my wife's purse or into a car (for parking, washing, etc)
 
Fine for decent size coins, but what to do with 10c, 20c, maybe even 50c
$1 and $2 coins are useful, if a bit heavy
 
Offtopic. I was wondering why a website sometimes has https://*www*.name.com and sometimes it's without the www?
 
There are reasons. I read about it once and promptly forgot.
 
there is no winning with the markdown
 
12:17 PM
Nope
 
For example, my site has different logo font when I add the www.
 
Feb 5, 2013 at 16:33, by swasheck
too much markdown make chat.se go BOOM!
 
But both versions work. Erik's site always has the www.
https://www.erikdarlingdata.com/
 
@Zikato Sounds like a webdev problem
 
maybe that's the reason for bad SEO?
@PaulWhite Definitely, I learn one step at a time
 
12:24 PM
> Access to font at 'https://straightforwardsql.com/fonts/CeraCompactPro-Bold.woff2' from origin 'https://www.straightforwardsql.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
@Zikato I get that error when loading the www prefixed version of your site
Most people do a 301 redirect AFAIK so both are served from the same source
Erik's site does, for example
 
Thank you, I'll have to do some studying to fix it
 
www was a mistake
 
13
Q: Remove WWW prefix from your website

RobHow does Stack Overflow (and other web sites) remove the 'www' prefix when it's entered as part of a URL? Is it a redirect, a rewrite or something else entirely? Update: I'd specifically like to know in the context of IIS 6

 
yes exactly
 
12:40 PM
@PaulWhite either is fine
 
I was mostly wondering what people preferred
 
I'd say it depends on the target audience. If it's to be understood easily or if correct terminology should be used
 
1:38 PM
yes
 
@Zikato that comment could be expanded into an answer.
 
I wasn't sure about it. On one hand, I'm asking about the clarification, OTOH I'm offering a solution if that's true
 
@PaulWhite I think subquery is recognizable to a broader audience. At least for me, I hadn't heard the term derived table until I really got interested in databases.
 
1:53 PM
they asked for the best possible way to do it. So an answer with a slightly different table design is perfectly good in my opinion.
@JoshDarnell to confuse the audience even more, refer to it as just "table". Or "table U"
 
@ypercubeᵀᴹ Haha right.
If someone asks a question about it, just send them a link to Itzik's 20,000 part series on table expressions.
 
I was thinking of something like
> What do you mean "it's not a table"?
> We just updated it, didn't we?
 
LOL nice
 
2:28 PM
@Zikato Charlieface already edited his answer with a suggestion like yours. @Charlieface, don't you need a UNIQUE (Name) constraint as well?
 
2:45 PM
I'll delete my comment then.
But yeah, the UNIQUE (Id, SystemType) doesn't make sense. Id is already Unique. It should be just the Name
 
@Zikato In the interests of full disclosure, I was trying to get my head around how to do it (knowing that a different structure was needed) but then saw the comment and modified accordingly. If you'd made an answer I would have left it
@Zikato The reason I did that is because we need a foreign key across those two columns, so it needs a secondary key. This allows you to enforce that the child table only contains rows where SystemType = 0
 
@Zikato the (Id, SystemType) is needed for the FK.
 
No worries, I had to step out anyway. True, but the foreign key should be just the ItemType.Id. I thought that was the point of surrogate PKs
 
They could alternatively use (Name, SystemType) of course but I guess that would modify the design more.
 
@PaulWhite HTTP (the protocol) was a mistake.
 
2:55 PM
@Zikato The SystemType looks redundant but it is required to enforce the wanted constraint. Otherwise a row from the tenant itemtypes could reference a systemtype.
 
In the child table note that it's a computed column.
 
there is no Unique Name and TennantId, ItemTypeId combination
hmmm. Altought, it seems like there can be duplicate names as long as they belong to different tenants.
 
3:25 PM
Yes that's exactly the point. As far as Name is concerned, OP has used a surrogate key so I'm not getting involved
 
My bad then. It would be far easier to understand if they provided examples as @ypercubeᵀᴹ requested.
 
@Charlieface the OP has a UNIQUE (TenantId, Name) so it needs a UNIQUE (Name) in yours to keep that restriction (there can't be two rows with same Tenant and Name)
 
@ypercubeᵀᴹ All right all right I've changed it. Everyone happy now? :-)
 
living the dream ;)
 
3:41 PM
I love surrogate keys because Entity Framework told me to.
2
 
4:04 PM
Every time you listen to Entity Framework, I store a file in a database.
 
@Zikato 😲
You monster.
 
Fight evil with evil
 
4:28 PM
I have power again!
2
 
@SeanGallardy-MostlyRetired Hooray!
 
@JoshDarnell Looks like NC is starting to get some storm surge.
@Zikato How much do you want to hate life?
This is mostly correct, depending on your version of SQL Server: techcommunity.microsoft.com/t5/sql-server-blog/…
 
@SeanGallardy-MostlyRetired Yeah. It's currently pretty windy over here east of Charlotte. Which I assume is some kind of front being pushed ahead of the main storm.
 
It may require obtaining other UCS level events
 
4:47 PM
@SeanGallardy-MostlyRetired I think I can hate it a little more
 
5:09 PM
user image
5
 
Hahaha love it.
 
5:46 PM
@SeanGallardy-MostlyRetired I've seen this before, but it's like you've blogged. It collects 10s of GB of data per minute on each replica. We just sent it to MS to be analyzed and then you won't get any meaningful reply for months
 
 
1 hour later…
6:58 PM
TOP (men) have left support in droves
Perhaps even groves or copses
Perhaps they need a Forrestry department
Haps Per Second++
 
7:22 PM
Heap meme density threshold exceeded.
6
 
8:01 PM
My density knows no limits
 
Each pound weighs over 10,000 pounds.
 
8:43 PM
@Zikato I don't remember who I was talking to before, but the volume is so high and there is so much data that needs to be sync'd between different points that for a small run I was able to analyze it in a few days. Having said that, I left CSS and was 1 of 2 people who could do this stuff. Many have left since; I wouldn't be surprised if no one else knows.
@ErikDarling I had to lookup copse. Wow, that's a word.
 
9:05 PM
@Zikato no way he could lift that
 
9:35 PM
Maybe if it were pink.
 
10:06 PM
@Zikato My newest avatar now!
 
@JoshDarnell we know how he loves pink swords
 
My Halloween costume, but with a pink sword?
 
It’s never too late
 

« first day (4286 days earlier)      last day (574 days later) »