@ConcernedOfTunbridgeWells The last time I played was the time I broke my ankle. First time I played I dislocated my thumb. Maybe I shouldn't play rugby.
@swasheck It took a minute for my local server to give me that plan that I can't even zoom out on, 6 minutes for the 2012 dev server to give me a plan, and 2 minutes for 2016 to tell me it couldn't make a plan. I'm going to go ahead and refactor it. Obviously I can't just keep stacking all these results, I'll probably need to materialize them.
if you scroll down on that plan, there's a little warning message that says "here be dragons"
the reason you can't zoom out any further is that the fully rendered plan forms the shape of the Unspeakable Rune that is the true name of Ba'al the Soul Eater
that plan is so fat, when it sits around the house it really sits around the house
that plan is also a rough approximation of the EKG of the DBA who has to read that plan as they scroll down
@TomV-trytopanswers.xyz Finland is more fun for speeding fines. theguardian.com/news/datablog/2015/mar/04/…Back in 2002, a Nokia executive received a ā¬116,000 fine for speeding on his Harley Davidson motorcycle
@Marian Yeah, I have a recurring shoulder issue that would need surgery to really take care of, but I try to postpone it
The doctors advise me to postpone it as well. Basically it's some calcium rubbing against a tendon, but to remove it they would have to remove the tendon from the bone and reattach it.
And they are pretty sure the calcium will return since it's the result from a small fracture, and in their words: "We can't reattach a tendon more than a few times"
i was calling it "cartesian update" cause the first example i could think of as an example of why not to do it was "typo: oops, now you have a non-deterministic update", but that feels super imprecise
or... not even typo really, just a bad assumption about your DDL and/or the data in them
Iām one of 10 software developers within a government organization. We support the 30 or so pieces of software that keep the organization running and build new software to ensure that we can continue to service our citizens. Some of those software pieces have multiple client organizations across ...
that's better, feels really close to the other thing i'd been thinking of calling it though (non-ANSI update - which is almost deliberately misleading)
@AndriyM doesn't replace it at all, just moves it from below the UPDATE to above it :P
hence... probably "cheating" to say i don't UPDATE...FROM
-- consider
UPDATE f SET
a = b.a
FROM foo f
JOIN bar b ON b.id = f.id;
-- versus
WITH cte AS (
SELECT
f.a,
b.a AS new_a
FROM foo f
JOIN bar b ON b.id = f.id
)
UPDATE cte SET
a = new_a;
Ah, this must be the issue I had in mind: dbfiddle.uk/… Apparently SQL Server is smart enough to figure out the target table as long as you are only updating the same table's columns.
@Johnakahot2use The heap of 7 years ago had quite a few names there. Maybe we'll call it the "Original Recipe"ā¢ while the current incarnation is "Extra Crispy"ā¢
@Taryn that's not the database taking a day off, that's the database overdoing it on the pre-workout
@AndriyM sanity check. postgres doesn't allow updates to target derived tables, but UPDATE...FROM statements should still be portable from T-SQL, right?
UPDATE f SET
a = b.a
FROM foo f
JOIN bar b ON b.id = f.id;
-- is equivalent to
UPDATE foo SET
a = b.a
FROM foo f
JOIN bar b ON b.id = f.id;
i'm trying to prefer a syntax that makes it super easy to see when you've written a non-deterministic update, doesn't seem like there's an obvious option for that in postgres
Well, at least it's completing now. After Mardi Gras, I need to go look at the 2016 dev server and see what the deal is. Both builds are supposed to do all the same steps - install databases, run all the same tests, build all the same documentation, data dictionaries and test results.
yea, i'm used to having a bunch of syntax options in SQL server that seem to be not available in postgres. i like having an update statement that looks almost exactly like a select statement to make my life easier when testing & debugging live data
@Philįµį“¹ I needed that. So badly. I've been trying to make sense of some terrible ETL code and it's making me alternate between going WTF? and My poor little brain hurts.
@ConcernedOfTunbridgeWells I feel your pain. Iāve found trouble in river city with my update syntax problems. Apparently the crappy syntax works where the syntax I like doesnāt. And for the life of me I canāt see why