« first day (2106 days earlier)      last day (2763 days later) » 

5:36 AM
zzzzzzzzzzzzz
 
That's my definition of a Monday morning.
Morning.
 
5:56 AM
@PaulWhite Thanks
 
 
2 hours later…
7:56 AM
3
Q: "Measure Type Dimensions" in "Accumulating Snapshot" fact table

Mattia NocerinoI have an accumulating snapshot fact table that tracks the entry and exit of containers in a terminal. The containers can entry and exit in 3 different ways, so i thought to create a specific dimension table that lists these 3 possible ways (train, vessel or truck). Then i read this article wh...

We don't get lots of questions
 
8:12 AM
Hey @mods, is this editor the OP: dba.stackexchange.com/review/suggested-edits/78841 ?
 
@AndriyM Loks that way
0
A: Spotlight for SQL Server LockType explanation required

Sebastian GodeletWe list all known (to us) wait types in the Waitopedia, although I can't find AWAITING_COMMAND in there nor on MSDN. Which version are you using? You would gain most from also checking against the workload analysis

It would be nice if we could vote for "delete and convert to comment" and not only for "delete"
 
@ypercubeᵀᴹ Seems likely to me too. If mods will prove us wrong, I guess we can just roll it back
@ypercubeᵀᴹ I think that was an attempt to answer, though. Judging by his use of "we", the answerer is probably affiliated with Spotlight.
I mean, it's not because he seems to be with Spotlight that I think it was an attempt to answer, of course.
 
@AndriyM "Software Dev Staff Engineer at Dell", so yes
 
@AndriyM This part?: "You would gain most from also checking against the workload analysis" Hardly an answer but I guess we could see it as an attempt to answer,
 
8:41 AM
@ypercubeᵀᴹ I think I was mistaken. The whole post does seems to be a comment much more than it seems to be an answer.
 
9:09 AM
Donald Trump really is bonkers. Surely he'll have a horrible "accident" if it looks like he's going to win?
 
 
2 hours later…
11:55 AM
Clever:
1
A: Using DISTINCT in window function with OVER

BenThis gives the distinct count(*) for A partitioned by B: dense_rank() over (partition by B order by A) + dense_rank() over (partition by B order by A desc) - 1

 
 
1 hour later…
12:57 PM
the person did not think much to find nice table (variable) names:
0
A: Cleanse a table of customers based on them not existing in another table

Chad MattoxBased on the limited Info, here is an Example of what I think you want: USE TempDb Go CREATE TABLE #t1 (c1 int) GO INSERT INTO #t1 VALUES(1) INSERT INTO #t1 VALUES(2) INSERT INTO #t1 VALUES(3) INSERT INTO #t1 VALUES(4) GO CREATE TABLE #t2 (c1 int) GO INSERT INTO #t2 VALUES(1) INSERT INTO #...

 
@dezso Hey, he's a Certified Master, who are you to doubt? ;)
 
@ypercubeᵀᴹ ah, so they are doing it like this
 
I'm more irked by the lack of Terminators
 
JNK
I always love seeing INSERT INTO ... VALUES with single row VALUES statements multiple times
It's MORE WORK
 
@JNK ;)
 
1:08 PM
@ypercubeᵀᴹ Edit them in :)
 
@ypercubeᵀᴹ Yes. I always thought the world needed Aliens vs. Predator vs. Terminator.
 
1:29 PM
@ConcernedOfTunbridgeWells That would be a great movie
 
@ypercubeᵀᴹ full of semicolons
sounds entertaining
 
I'd like to see the backstory on the creature/society that the original Alien was found in.
Apparently it's called "The Pilot" avp.wikia.com/wiki/The_Pilot
Trying to search on "the other alien in alien" was a painful slog
 
why do they call it express edition if it goes slower
 
@Philᵀᴹ Eventually Edition might work
 
2:01 PM
@Philᵀᴹ lol @ that twitter
do canadians use "eh" as a batch separator
 
 
1 hour later…
JNK
3:09 PM
Q for the room - anyone have experience with RCSI iso level?
 
3:20 PM
@JNK It's the default in AX, so yes
 
JNK
we have a lot of blocking issues right now in production and I'm considering using it. I've read the official docs and some posts, like the one from Brent about it. Just looking for real issues/problems or whatever from people who've done it.
 
I guess it depends on your application. We don't run into any real world issues, and every single recent Dynamics installation uses it without any real issues
Our app doesn't use triggers for example
But locking issues have dramatically improved since that setting became standard
However, tempdb performance becomes a lot more important in my experience
 
3:46 PM
That's what I understand too, that in order to use RCSI it becomes particularly important that your tempdb is configured properly.
But so far I'm only conjecturing myself, as I've never worked with it so far
 
However, I would have to add that the problems in our app are largely due to a design that was never intended to handle the concurrency Microsoft is trying to sell it for
aka not enough normalization, wrong indexing, wide varchar indexes and clustered keys
It was, probably as you see it, a "quick fix"
 
@JNK Are you currently in RC?
 
JNK
yeah we are using RC
we use SNAPSHOT for some things in our reporting server
but locking is just getting worse and worse in production
and I had read that too about tempdb, @TomV
I'm trying to tackle the code issues I can now
Basic issue for us is our application saves a whole lot of data when people do work
 
@JNK Are they code issues or db design issues?
 
JNK
this worked just fine when we saved 1000 measurements a week
now we do 55k or more a day
@TomV yes!
 
4:02 PM
@JNK also, are your transactions as atomic as they should be?
Rethinking how much we do in a single transaction has helped a lot on numerous occasions too
 
JNK
yeah but problem is some of these need to have 4 or 5 tables or more populated in a single trans
parent item, then child item, then child items of that, then potentially child items of THAT, then potentially children of THAT, and then update the parent of the parent
 
4:17 PM
@JNK I was thinking inserting 55K measurements in one transaction :)
 
JNK
@TomV thankfully no
but we do 55k of those trees a day
the data structure we break it down from may be up to like 50-100k
 
@JNK that's 2 every 3 seconds. Very low volume?
 
4:32 PM
@Philᵀᴹ All during working hours I understand
But RCSI would prevent readers and vice versa from blocking that in a risk tradeoff
@JNK can you load test the change?
 
JNK
@Philᵀᴹ yeah mostly between 7am and 6pm
@TomV KIND OF
I have a QA setup obviously but hard to replicate the concurrency in prod
 
unless you can script it
 
JNK
we have anywhere from 10-150 projects in progress at any point in time during the day
well my main concern w/ load testing is actually comparing what users are doing
a lot of that is in unrelated DB calls in the various portuions of the web pages being loaded
 
I know Microsoft did their test using the Visual Studio Load test framework
But that's an enormous amount of work to set up in a complex scenario
 
JNK
my main worry with RCSI is impact on business operations, i.e. we have a list of projects to start in a queue, and that record is updated when someone starts work
I don't want someone else to think they can start that record
also some of this stuff is why I am trying to hire another engineer
b/c I do not have days of my own time to allocate to it unfortunately
but yeah reproducing load is one of my concerns
 
4:48 PM
Would Distributed Replay work for that?
 
JNK
<--- 2008r2 still
though that's a good argument for upgrading too (it's 2012+ right?)
 
2012+
 
@Forrest Good point, do you need a 2012 server or just the client?
 
I haven't used it myself - just looking at MS documentation.
 
The problem is, as JNK is fearful of, detecting the edge cases where a race condition would show the user wrong data leading to wrong decisions
 
JNK
4:52 PM
well I can probably try to make those happen on my own
I can induce say a long lock on one of those items inside a tran
I could also for those business cases potentially put RC explicitly in the stored proc
 
I guess if you replayed a workload you could prove problems exist if you end up with different data depending on isolation level.
But I don't know how you would prove problems don't exist.
 
 
1 hour later…
6:08 PM
@TomV No worries. You & the 4D person handled it all very well btw.
@AndriyM Almost certainly the same person from what I can see, yes.
 
@PaulWhite I refrained from saying "had your question included those details from the start..."
:D
but thanks, I didn't think I did, I fueled the discussion from the start and I shouldn't have
And all that for a 50 point bonus, points he'd have lost anyway
But I believe the bounty was added after the accept (which may be wrong) hence my initial comment
 
6:31 PM
@TomV Comments helping people learn to use the site are a perfectly good use.
 
hmm, so he accepted before it really answered his question then, as the enterprise comment was after the accept
bizarre
 
@TomV No the accept came later, but the user timeline doesn't show that. You have to click on the embedded timeline on the answer. LOL.
 
Anyway, I tried to help him understand, no sleep will be lost over it
And I didn't know about the timeline, do mods have that in the GUI or should we just URL hack :)
 
@TomV Yeah. I'll tidy it all up at some stage. Probably when the bounty grace period ends.
 
I'll try to remember, if it's not cleaned up in a week I might flag it again
 
6:36 PM
@TomV I always edit the URL manually to get to the timeline.
@PaulWhite Thank you. As I suspected.
And likely everyone else
 
Okidoki.
@TomV There's an expanded version in the mod GUI. For users, URL hackery is the order of the day as @AndriyM says.
 
That was towed in our customers' parking lot today, unbelievable the driver survived
 
JNK
7:05 PM
wow
modern vehicles do have a pretty amazing ability to carefully destroy themselves to protect the occupants
 
@JNK That's the biggest thing IMO. For most scenarios, RC -> RCSI is not that dramatic (assuming adequate *tempdb etc.) but apps that rely heavily on the blocking behaviour of default RC can be tricky. The READCOMMITTEDLOCK hint is useful.
 
Oooh, timeline
 
@JNK But knowing where and when to use it is fairly advanced stuff, and requires good business logic knowledge as well as SQL technical.
 
JNK
@PaulWhite yeah that was my thought, using explicit locking for the couple of things that actually rely on it
 
Concurrency behaviour is 'fun' to test as well, as you noted.
 
JNK
7:09 PM
the logic is pretty well modularized in the DB so I have probably 1 or 2 stored procedures that would need to check that and I believe we really just have one or two tables that it will be an issue in
I know that the majority of my issues are code/design related but I am looking into ways to buy a little more time on major refactorings
 
Any trigger code needs careful checking too.
 
@JNK In my experience it's worked wonders, given you can mitigate the risks and keep an eye on tempdb size and throughput, and as Paul says and I've mentioned we have no triggers
 
I wonder if the problems you're facing would be better without foreign keys?
 
My broad experience has been that RC -> RCSI changes have been less dramatic than feared in all cases, but it is definitely good to start out a bit scared by the change.
Phil is about to suggest you move to NoSQL.
2
Don't listen to him :)
 
Oh, has he switched from MySQL then? :)
 
7:13 PM
ha ha ha
 
JNK
@PaulWhite we have triggers I THINK in just one table in production
lol
I am considering NoSQL or just a mem cache for some of this stuff
not the heavy lifting but I have some tables that are hit a couple million times a day for simple state lookups for a user
that I do not need in a relational DB
 
I'm sure we all trust you to do the right thing.
 
JNK
well if I don't I'll warn you about how I blew it all up
 
We always enjoy that sort of story as well, so win-win.
 
@JNK you need MySQL then!
2
 
 
3 hours later…
10:27 PM
0
Q: I have selected an answer, but my requirements have changed

Jeff.ClarkI recently posted a question here that garnered a couple nice answers. I selected the best one that worked and went on my merry way. Now, however, my requirements have changed slightly, but enough that the the answer doesn't quite fit. Is it more appropriate to create another question, and mayb...

 

« first day (2106 days earlier)      last day (2763 days later) »