« first day (5140 days earlier)      last day (24 days later) » 

02:32
A chairde - Morning all!
Wordle 1,321 4/6*

🟨⬛🟨⬛🟩
🟨🟨⬛⬛🟩
⬛🟩⬛🟩🟩
🟩🟩🟩🟩🟩
02:48
Morning.
I know timezones are thing, but don't you have like 3 AM in Ireland?
Though I am not one to judge, it's 4AM here.
03:28
Best time to be awake. Fewer annoying humans around
Sure. I like that time, too.
But it kinda fucks up the rest of my schedule. I am sure afternoon-me is going to be annoyed at 4AM-me for not sleeping.
 
3 hours later…
07:08
@Yano_of_Queenscastle My sleeping isn't so good at the moment - I had snoozed for a while but awoke at 02:30 (2:30 AM in freedom units) - where is it 4AM when the UTC time is 02:48? Assuming that the Heap uses UTC in it's display? It appears to do so here.
@Yano_of_Queenscastle Me too - the grumbling's already started!
07:53
Wordle 1,321 4/6*

🟨⬛⬛⬛🟩
🟨⬛⬛🟩🟩
⬛⬛🟨🟩🟩
🟩🟩🟩🟩🟩
Wordle 1,321 4/6*

⬛⬛🟨⬛🟩
🟨⬛⬛🟨🟩
🟨🟩🟩⬛🟩
🟩🟩🟩🟩🟩
08:17
Wordle 1,321 4/6*

🟩🟨⬛🟨⬛
🟩⬛🟨⬛🟨
🟩🟩⬛🟨🟩
🟩🟩🟩🟩🟩
 
1 hour later…
09:30
@Vérace I rounded up a bit, but Czechia is at UTC+1 (at times, at least). I think The Heap™ actually uses some local time. At least for me it always shows right time.
Yes, chat shows local time.
10:06
Is Erik ok?
 
1 hour later…
11:12
@Yano_of_Queenscastle From here, only some obscure archipelagoes use that time zone!
11:50
@Vérace Greenland is neither obscure (according to Trump) nor an archipelago. Although I got the impression it was +1 not -2 being discussed.
 
2 hours later…
13:40
@Vérace We use the boring Central European Timem that is UTC+1 or UTC+2, depending on seasons. We might be small country, but no obscure archipelagos here!
 
2 hours later…
15:16
@Zikato much better now, thank you for your kind attention
@Charlieface Its population is less that of Lisburn - that's *obscure!! :-)
@Yano_of_Queenscastle Oh - when I search for "Queenscastle" I get some obscure place in Missouri (or Wyoming... or somewhere else I may have flown over... ). :-) Oops, just checked - it's even worse than I thought - it's in Indiana - saw it once (Gary) from the viewing gallery of the John Hancock building in Chicago!
I very much doubt Trump has heard of Lisburn though...
@Vérace Might be referring to this one...
Windsor Castle is a royal residence at Windsor in the English county of Berkshire, about 25 miles (40 km) west of central London. It is strongly associated with the English and succeeding British royal family, and embodies almost a millennium of architectural history. The original castle was built in the 11th century, after the Norman invasion of England by William the Conqueror. Since the time of Henry I (who reigned 1100–1135), it has been used by the reigning monarch and is the longest-occupied palace in Europe. The castle's lavish early 19th-century state apartments were described by the art...
15:36
git pull
Waits 20 minutes
Found 0 objects to send
Waits 30 minutes
Received 83000 objects
Waits 10 minutes
Resolving 53000 deltas
<scrolls a billion lines>
Waits 5 minutes
Updating files
Waits 5 minutes
More scrolling
Do a git pull, go eat lunch
16:03
That's a big git repo.
@SeanGallardy SQL Documentation?
Nah, they don't have that much documentation
The manual for emacs?
or vi, take your pick
16:19
sean downloaded an optimizer
I'm sure it's a huge, old codebase, but I wonder if it's ALSO contaminated by large (binary) objects. That can make cloning brutal.
16:48
powerbi dashboards and whatnot
@Charlieface It's more or less literal translation of the my city's name :-) It was one of cities reigning kings gave to queen to support her.
does this mean chat has ✅✅
Interesting, so even though it was often known as Krajova in Hungarian and German, it actually comes from králové in Czech which means queen, rather than the unrelated Slavonic root krajina (or krai) which means border.
Seems like it, but better to double czech.
@JoshDarnell That it does, and yes it does
17:05
Czech has often interested me: we have a guy from Moravia (Morava) who told me his dialect of Czech is actually closer to Slovak than to Praguer Czech
I always assumed they speak like that mostly to confuse tourists from Prague. The better the connection between the capital and the regions, the more homogeneous the language becomes.
17:21
@Charlieface I call bullshit
Kecy v kleci
Dunno, I would find it pretty believable - 70 year ago.
@Yano_of_Queenscastle we're neighbours
Basically :D I know you mentioned you're from Pardubice.
17:48
@Zikato Dunno, that's just what he told me, I think he said he's from Ostrava or some such.
But I can czech again
okay, stored procedure compile time parameters aren't in the execution plan. there's no optimize for unknown hint, there are no local variables in use, and parameter sniffing is not turned off as a database scoped configuration. is there anything else that would mess that up?
@ErikReasonableRatesDarling Sorry what situation are you talking about? Also what are "compile time parameters"?
in query plans
compile time parameters are stored with their values
but not in these!
I feel like I've seen this before, but I'm trying to remember context
Oh I see you mean the parameters used when the plan was cached.
WITH RECOMPILE maybe?
psp?
with recompile you can get the literal values out from the xml
Given the parameter names it looks like a Linq2SQL ad-hoc batch, not a procedure?
it takes more work but they're in there
@Forrest i've only ever seen it in the contexts i listed
@Charlieface the example i'm showing you is when they're there, it's more difficult to show you an example of when they're not there 😃
Always Encrypted?
17:56
i don't see anything in sys.column_encryption_keys
I don't remember if psp messes with them
@Forrest no psp, compat 130
gotta ask, TFs?
forced parameterization?
@Forrest none i can see, but azure sql db so no dbcc trace status. nothing listed in the query plan either.
@Charlieface no, but that wouldn't mess with things that are already parameterized
18:04
ooooh, Azure SQL DB, that's where I think I saw it
but no other ideas, sorry
I assume you can repro from an ssms call?
this is where the plot thickens
some parameterized statements do have them (like the one above). the one i need to repro does not have them.
🥴
there must be something silly in the way the application calls this
the statement looks like any other parameterized execution
(@list of parameters) select...
oh son of a bitch
i think it's because they get passed to an itvf
wait no they're used elsewhere too
some are passed to the itvf, others are used in a where clause
i wonder if the itvf pokes eyes for all of them
let's see
okay no that's not it
18:21
"Baggins is stuck..."
you can bet your pipe weed on it
Maybe this?
https://learn.microsoft.com/en-us/sql/relational-databases/performance/intelligent-query-processing-details?view=sql-server-ver16#table-variable-deferred-compilation
it's not a table variable
there is no table variable in use
oh, it's not table variables in your example
oui mon ami tchèque
table variable contents are never available
18:38
Yeah, I was thinking about interleaved execution. Couldn't recall the name
18:49
sounds like you've been to MARS
Maybe sp_prepare is being used? brentozar.com/archive/2018/03/…
I don't actually know if that obscures params in the plan. It just came to mind.
19:04
i'm waiting to get more details from the developer(s)
i don't think sp_prepare or mars is in use
.net sql provider and all that
0
Q: stored procedure gets max startDate

JeffersonI have this stored procedure that I want the max startDate base on AgentId or without the AgentId. The way I am doing this is using a if else and wanted to see if there was a better way to do this? IF (@AgentId = 0) BEGIN SELECT top (1)max(cgv.StartDate) as AgentLatestPublishedD...

comment answers abound
lots of them today
there oughtta be a law
we don't need more laws
maybe there should be a law about laws
 
1 hour later…
20:34
What is it? Some kind of Law Law Land?
20:51
@Erik How exactly are you obtaining the execution plan
FORCE_SHOWPLAN_RUNTIME_PARAMETER_COLLECTION help?
21:21
@PaulWhite grabbing it from query store
@PaulWhite Dunno, can’t go messing with production at the moment
@ErikReasonableRatesDarling Sorry, I've just noticed
@ErikReasonableRatesDarling Ok, well it's a mystery then. If it were me, I'd try collecting plans in different ways to see if it was specific to QS or not. Then again, you might be OPping and there's some crucial detail missing.
@PaulWhite i will update when i have a response from the developers. i was hoping there was something obvious that i neglected to check.
Did you try not using Azure SQL Database
That has Sean's sticky fingers all over it
A wonder anything works
21:27
AI will fix it
@PaulWhite My fingers are very clean, I wash my hands half as much as an obsessive compulsive person
perhaps one of you can spare a cigarette
waiting is quite trying
i suppose i could descale my espresso machine
maybe take a shower
21:45
don't forget to invoice for your wait stats
i will also invoice on all of your behalves
I'm surprised you're not busy in their test/staging/qa environments
the query doesn't run naturally there
and without the half a dozen input parameters...
it seems like it's worth solving the parameter mystery before i go making up parameter values
who knows what oddities are at play
huh people still call themselves vmware experts
22:37
@ErikReasonableRatesDarling Do you have a plan available for the curious
Seems like trying to push the tide out
Typical moderator, quashing resistance
22:56
2
A: Stored procedure to get max startDate with optional AgentId

Yano_of_QueenscastleCurrent solution Your version is certainly not the worst. Main problem is you have the same code twice, which has some maintenance overhead (i. e. all changes must be applied to both code blocks). But T-SQL is not Java or C# - it doesn't give you as many tools for code deduplication (and many of ...

Answer renders comments obsolete
Quashed
If I were a picky sort of person, I would say a flag would have been helpful
But I am not, so
Hopefully next time people who answer questions will be more considerate.
Hope springs eternal
23:16
The Sun also rises
And the tide comes in
@ErikReasonableRatesDarling ty
least i can do
i'm a sporting chap
don't tell the ducks
23:41
@ErikReasonableRatesDarling QueryCompilationReplay = 1 is interesting
23:57
As is ParentObjectId = 0. I thought this was a stored procedure?

« first day (5140 days earlier)      last day (24 days later) »