« first day (3338 days earlier)      last day (1529 days later) » 

1:04 AM
@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.
 
1:22 AM
user image
5
@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.
That image is only the top 1/4 of the plan...
2
 
 
3 hours later…
4:04 AM
Wow 😮
 
 
3 hours later…
6:59 AM
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
2
 
@TomV-trytopanswers.xyz I saw a bit of Wales vs. France
Morning
@PeterVandivier Have you ever been to Switzerland?
 
7:15 AM
i have not... 0_0
is the driving... good?
pleasant, perhaps? plenty of space and courteous, cautious drivers?
 
7:29 AM
You don't want to be caught speeding in Switzerland, the fines are no joke
10 over speed limit in built-up areas is already 250 euros :D
 
0____0
i joke but i hate driving no matter where i am. my wife has assured me that driving in Italy is also far worse than the UK
 
morning all.
I'm back
@PeterVandivier may be but you get the chance to drive over the 110 km/h limit of the UK
Not too much more but still ;)
 
screw it, i'm just gonna learn to ride a horse
this is clearly the sensible choice
 
7:55 AM
@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
 
Morning
 
@Philᵀᴹ 116K?? 😂
 
8:22 AM
How would you add a comment about a possible solution if you only have a tweet link?
 
9:04 AM
@PeterVandivier trying not to laugh
31 km/h over the limit can put you in jail nowadays.
 
9:17 AM
I just came back from the doctor who gave me some injection.
I feel like I've just had 2 glasses of wine on a monday morning
:/
 
Instead of the usual 3 breakfast glasses?
 
🍷🍷🍷🧇
 
Cortisone and lidocaine mix, I'm not sure I'll get much done today
 
@TomV-trytopanswers.xyz you ok?
 
@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.
 
9:28 AM
@TomV-trytopanswers.xyz sounds like you're me :D
@TomV-trytopanswers.xyz I see, hope it'll pass soon
 
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"
 
does anyone have a good name for / know if there's "official" name for this kind of syntax?
UPDATE foo
SET foo.a = bar.a
FROM bar
WHERE bar.id = foo.id;
trying to get a dev to not write his updates in that form, but i can't think of the name
 
fuck-up? :)
 
@PeterVandivier I just call it "update from"
 
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
 
9:51 AM
JOINED UPDATE?
UPDATE JOIN?
 
10:04 AM
@PeterVandivier a FUBAR?
 
10:29 AM
Terribad™ (possible copyright by @billinkc March 12, 2013)
 
10:40 AM
47
Q: I am a resource being fought over by several business units. Boss can’t provide clarification on what I need to be doing

confusedfocusI’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 ...

> "SQL is a rapper."
Ol dirty database
 
11:08 AM
@PeterVandivier I think you could call this kind of join an implicit join.
 
🤔
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)
 
@PeterVandivier you could prepare some templates for them
 
:) yea, but it'd still help to have a label for it to make it easier to say "don't do that-thing"
TIL though that UPDATE...FROM is in every case non-ANSI
the-more-you-know.gif
 
It's a shame though. I like the UPDATE...FROM syntax. The Real Database™ supports it too, which I'm sure says something.
 
i've started preferring a CTE above the UPDATE that means the FROM is pointless
i like being able to easily highlight and run the CTE separately to see what's about to happen when the full statement runs
although i don't know if that's Cheating
 
11:18 AM
Not sure I can see how a CTE can completely replace using FROM. It can be used in some cases (and sometimes more efficiently too), though.
 
@PeterVandivier formation-formation-formationç
 
@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;
 
@PeterVandivier But are you sure that CTE is updatable?
My brain needs some nutrition but I'm going to try that pattern after lunch
 
works in SQL Server
sadly not postgres 😢 shit... guess i haven't done that in awhile
 
In PostgreSQL CTEs are materialised to begin with. But it doesn't support updatable derived tables either (unlike SQL Server).
But thanks for the example, I don't know why I thought it wouldn't work
 
11:29 AM
yea, gonna have to go back to the janky old way i did it...
UPDATE foo SET
---SELECT f.a,
    a = b.a
FROM foo f
JOIN bar b ON b.id = f.id
which is way less clear what you're doing
and also sucks b/c it looks like you can't UPDATE alias ... FROM tbl AS alias in postgres either
 
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.
 
also no alias = tbl.col syntax in SELECT blocks which hurts reusability too :/
yea, you gotta keep the modifications in the CTE
but again... that's the point of doing it that way IMO
and also "the modification affects multiple base tables." :p
@PeterVandivier oh oops, nope, i'm a liar dbfiddle.uk/…
 
Yes, you can update either table that way, just not both at the same time.
Right, I'm definitely off to lunch now
 
✌️
 
 
4 hours later…
3:17 PM
@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"™
 
Or simply Toast™
 
KFC doesn't sell Toast™
 
Not yet
 
Unless my chains in Australia are doing strange things
Fair point
 
Any chain that can conceive of a burger without buns is capable of anything
Also, for the record:
 
3:23 PM
user image
2
Ooh KFC toast
They serve that for breakfast in some places
 
Seattle's Best Coffee looks like such a sad admission of failure
 
The cheese on the toast looks delicious though
 
Also why is the title in French
 
c'est le déjeuner
 
Well yes
But why
 
3:25 PM
I don't even think it's French, Saw that on a few Romanian sites
 
hm the world is a strange place
I wonder what that food looks like in reality instead of AdvertLand
 
> Ia-ti un Caramel Latte impreuna cu noul Morning Meltz sau Chicken Toast, iar dimineata ta poate sa inceapa.
 
Chicken Toast!
Chicken Toast
 
@PaulWhite9 Probably even worse
 
Arriving at KFC for breakfast, I'd have to think carefully about my life choices
Great find though
 
3:30 PM
@PaulWhite9 maybe it's for people that have their in-laws over for a month
 
shudder
 
IT IS I, EVAN.
how is everyone on this wonderful day.
did you know, Monday is the furthest away from Friday while still being a workday???
 
I only ate in a KFC once, We didn't have one in Belgium at the time, and I drove past one in the Netherlands and stopped. It was disgusting
I was especially disappointed they didn't serve my chicken in a bucket
 
Clearly you didn't get an American sized portion
 
@EvanCarroll the database never takes a day off
 
3:38 PM
@billinkc I was checking the menu online to see what I got, I've almost fallen out of my chair
So this is a thing: 2 donuts with fried chicken between them
 
That looks awful, and that's coming from somebody who likes a turd sandwich for lunch
 
DV, the OP has obviously made no attempt to research this Q — BobE 14 hours ago
how does that kind of crap not get removed.
 
lol how does that graph go to 160%
 
pegging out more than one core on a multicore system?
 
4:01 PM
@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;
☝️ correct?
 
@PeterVandivier bot the most clear syntax but yeah:
UPDATE foo AS f
SET a = f.a || '?' || b.a
FROM bar AS b
WHERE f.id = b.id ;
 
7 hours ago, by Peter Vandivier
UPDATE foo
SET foo.a = bar.a
FROM bar
WHERE bar.id = foo.id;
☝️ vs that?
@ypercubeᵀᴹ ryan-reynolds-but-why.gif
 
Yeah. Awfully similar between SQL Server and Postgres
In SQL Server you are only allowed to alias bar
But you can move both tables to FROM (and then alias both), which you can't in Postgres
UPDATE f
SET f.a = b.a
FROM foo AS f JOIN bar AS b
WHERE 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
 
You cannot write a non-deterministic update in Postgres ;)
 
4:10 PM
srsly? happy day
 
Not entirely sure but what would be an example (for SQL Server)?
 
expanded a bit dbfiddle.uk/…
@ypercubeᵀᴹ so... am i missing something or is this statement wrong?
 
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.
But the 2016 server takes almost 3 times as long.
 
@PeterVandivier Right. That is non-deterministic,
Row with 2 could have been updated to either y or z.
 
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
 
 
1 hour later…
5:52 PM
@TomV-trytopanswers.xyz lol.. that's in Bucharest :)
but not a fan of KFC though
 
ಠ_ಠ
 
6:06 PM
billinkfc
 
te amo
I mean, The Ammo. This is murica after all
3
 
@billinkc Te Papa is a museum in Wellington
 
Do I need to wear my Wellies when visiting?
 
@billinkc They're called Gumboots you insensitive clod.
Not to be confused with clod hoppers.
 
King Francois Claude
 
6:30 PM
“ pronouncing "PostgreSQL" as "Post Greyskull" from now on” 😂
5
 
6:41 PM
@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
To the repro-mobile!
 
Postgres has always needed a decent logo. No reason why He-Man can’t step up to the plate
 
Hey! It has a... elephant... and a.... turtle....
 
7:31 PM
@billinkc lol
 
Elefurtle. Make it so
Torso of a turtle, legs and head of an elephant. My people shall ride into glorious battle on the backs of these mighty beasts
 
user image
2
 
But beak of a turtle
DAMNIT!
I wanted to hold all copyright, patents etc for this brilliant idea
Needs the plated underbelly though
Not sure how it'll be able to retract legs into the shell yet but I'll see what CRISPR can do
 
user image
3
?
 
This really calls for some patented KFCFotoShop...
 
7:37 PM
You better
 
I wish I was in New Zealand right about now twitter.com/friesfanclub/status/1231415478842642437
 
Bonus points if the elephurtle is wielding the Power Sword
 
I feel like Skeletor's staff would be a better fit
 
8:12 PM
@PeterVandivier Sorry, was busy, couldn't reply, though it turned out for the better as 'cube knows Postgres much better than I do.
 
9:07 PM
alright... why is SSIS fast-load so suspiciously fast...
 
9:20 PM
@James What do you suspect it of?
 
i suspect it of cutting a corner it shouldn't cut
the data is moved, i already checked because I didn't trust it
but if it's so great, why even keep non-fast-load in ssis?
 
Good point
 
I think I should switch over all the packages to "use fast load" then read up on what fast-load actually is
 
10:02 PM
We never used fast load at the bank.
But if you are loading to a staging table, I think it's probably OK.
 
10:36 PM
I only use fast loads
 

« first day (3338 days earlier)      last day (1529 days later) »