« first day (2594 days earlier)      last day (2573 days later) » 

16:00
0
Q: Slow query performance when searching for a particular value, but fast with a different value on the same column

enigma6205I have a SQL Server 2017 select statement that is executed by the front end application. The query has three joins and UNION. Each join statement has a clause where NAME LIKE '%ibm%'. When I change %ibm% to NAME LIKE %services% is runs fast as usual. I rebuilt all the indexes on all of the tabl...

@PaulWhite yeah, every single one. all the queries are generated by a web gui.
Far out.
typical this is an oltp database and we had a locking issue once because we don't know why so let's nolock the shit out of everything
The problem, as I see it, is mostly in the name
No one can be arsed to write WITH (READUNCOMMITTED)
@SeanGallardy-Microsoft Well we don't want locks do we
code golf, NOLOCK is smaller
Exactly so
plus it doesn't require you to know isolation levels, since most people that use it have no clue they exist anyway
And sounds like A Good Thing
16:03
i like when code starts with setting the isolation level to read uncommitted and it still littered with nolock hints
@sp_BlitzErik Disappointed that no field contains "your mom" there
2
Yes, you get an extra piece of cake
Sprinkling NOLOCK adds joy to the move from locking RC to RCSI
@PaulWhite i'm sure mrs. white is a nice lady; i would never besmirch her
16:04
rough crowd today
@sp_BlitzErik She's too good for me, that's for sure
> today
@PaulWhite i like the "we turned on rcsi and it got worse" people
"did you remove nolock hints?"
"no, why?"
deth
I don't think Jesus can save you from NOLOCK hints in RCSI
2
@PaulWhite again, we get a different level of pants on than you do
i had to answer the "do more indexes make the database bigger?" question recently
16:06
Mine are +5 blue jeans of ripping, ehnaced ability ot randomly rip in places
How do these people end up in database work rather than programming e.g. java script?
L M F A O
beggars can't be choosers I guess
"We wanted you to ruin a website today with javascript code, but you've been promoted to breaking databases today... it hurts much more people, faster"
Perhaps a special edition of SQL Server could be created for these people. One that only contains NOLOCK and JSON.
@PaulWhite the problem is that they do both and they're only good at one
@PaulWhite remember this one?
8
Q: NOLOCK hint changes order of records returned

ajehThere is a clustered index on a table Client field LastName. When I simply dump all records from the table, they appear in the alphabetical order unless (nolock) hint is used as in the query in question. That hint changes the order of records. Should it?. I am positive that no other session has...

16:09
XML, JSON, and other high level constructs IMHO don't belong in a database
If it requires its own DOM... yeah, no thanks
@ypercubeᵀᴹ ugh
complete with sp_who2 reference
Vote for Sean, Deprecation CZAR!
3
"nothing looks different in activity monitor"
My motto will be, "We can and will remove it!"
If someone artistic makes that in a Marxist style portrait with that motto, I'll set my internal photo to it
we'll count down the days until I get fired
a "fire pool" if you will
+1 would star again
16:12
lol I see my spelling was off
I'm leaving it
@SeanGallardy-Microsoft where?
my eyes are going, this monitor has such small font
so much for that Lasik
It's just your death approaching
oh, that's good, thought it was serious
Nope, everyone has that condition
16:14
NOLOCK? yeah, it's rampant
what you can't see is paul using his reality debugger to flip memory switches inside you
WITH (NOLUCK)
We need a picture of Paul with a vaccine shot in hand, then a quip about nolock
I've done my quota of photos for this decade
drawings don't count
16:15
So two more years and then another photoshoot?
Well ok so it's more of an artist's impression, but still
Ha nearly forgot
we went through such a spree of needing to order stuff that the days feel a bit hollow with nothing getting delivered
The ups and downs of capitalism
16:22
@sp_BlitzErik Well? Do they?
@SeanGallardy-Microsoft NOT YOU TOO
I'm 100% capitalist
free market baby
@JoeObbish i dunno, do heaps?
what if I create a disabled index
16:23
I shouldn't be regulated by the government to use 25% Postgres because it can't get any market traction
or a hypothetical index
@JoeObbish Those are stats
they have no pages, so no
or an index on tempdb
technically it still has a definition in the base system tables, so yes it does
16:24
create index ix_tempdb on tempdb
@SeanGallardy-Microsoft couldn't it fit in an existing page somewhere?
You assume there are free pages
I don't assume that, but there might be
or there might not be
It's a Paul White's Schrodingers Page
that's fine
I live in a flexible world
anyway it sounds like a wonderful question to me, despite what the Haters are saying
16:25
I'll let that one alone
florida man shows restraint for the first time in his life
Maybe the 3rd
MAYBE
florida man often shows restraint in not sobering up
I'm honored
16:27
"better not, might realize i'm in florida"
There are better and worse places
Worse: New York
Better: Ireland
mmmm I don't think that means what you think it means
if it were worse here we wouldn't need to give our homeless bus tickets to you
Is there any conceivable case where adding more indexes would not make the database bigger might be a better question, but I somehow doubt the asker was so sophisticated.
16:28
create index... where id = -1 and id = 1
or i hear columnstore is so well compressed it basically takes up negative space
define: database?
@sp_BlitzErik KFC loves it
@SeanGallardy-Microsoft the thing you drop on your last day at a job
If we're taking the @JoeObbish route of free system pages
any Hekaton index
I've said it before and will say it again - Columnstore compression is a hell of a thing. My table (#2) has 8 months of measurements at minute interval. #1 has 15 days of data. Same measurements
16:30
or any disabled, or otherwise 0 page index
Of course he smokes 11 herbs and spices so
@SeanGallardy-Microsoft I like that angle
mark it here folks, the day paul likes something about hekaton
Screenshotted for proof
Now you can't pix or gtfo
16:33
@sp_BlitzErik I've never been anti-Hekaton have I?
i mean not in the way that you're anti social
dunno that you've ever quite been pro hekaton
My only issue with Hekaton (with recent additions) is that people still try to use it in places they shouldn't
I admire the technology greatly
16:34
i always get asked about it for reporting
"My 32 GB server has memory pressure and crashes - my 200 GB database uses Hekaton"
"we don't want reporting queries to get blocked. it's lock free, right?"
"We used Hekaton but things didn't get faster"
I think it's latch free
I got a lot of pesky latches on my system
16:35
yeah, but that's not the question i get asked
LATCH_SH is the number 4 wait on my system
@sp_BlitzErik Ha ha very good the ultimate nolock
should I use The Hekaton? X/Y
LOL
Want to see if your laptop can run Hekaton?
@PaulWhite plz change that to "X/Y"
16:36
I use servers unlike the rest of you muppets
virtually
it's a virtualized world
I don't like it
I just live in it
can't make it see the code right, curse this formatting
we got a SAN
I don't want a SAN
but that's how it is
@SeanGallardy-Microsoft when you paste stuff in, a button will pop up next to send/upload that says "fixed font"
ymmv
@JoeObbish sans aren't bad when they're all flash with 10gb ethernet connex
and they're not more than 10 feet from the server
16:38
hrmmm
@sp_BlitzErik multiple 40GB + 12x ports
FTFY
how many sans are like that?
have many customers with that setup?
highfive
the high end ones
that have people that know how ot set them up
that aren't using SVCs improperly in front of them
@sp_BlitzErik and there's a competent and friendly SAN admin
this all sounds good
16:40
so... thomas grohser customers who all bought superdomes
how do I get one
Spend a few million
@PaulWhite oh wow, both?
is there a timesharing system available?
then realize you could get better performance on local NVMe
16:40
keys to the kingdom, this guy
@sp_BlitzErik It's the impossible dream
Like that job ad Erik shared
hah
@SeanGallardy-Microsoft fun game: when people tell you what their san is, go look for it on ebay
I wonder what would happen if we used in-memory CCIs for our import tables
16:43
says the guy complaining about memory waits for 3 months
yeah but that's separate memory, right?
Let's combine two new and very complicated technologies. What could go wrong.
3
just use nolock, joe
@sp_BlitzErik Hahaha I had a cx tell me their Tier 0 storage was an IBM XIV Gen 3
you guys are no fun
16:46
FYI - I was there because they complained that the SAN looked fine but SQL Server had "15 second IO" errorlog messages
I bet you're jealous
no one can generate memory waits like I can
It often takes me days to remember stuff so
@SeanGallardy-Microsoft single 1gb iscsi connection
of course
over the same switches as their normal traffic
@PaulWhite That glaucoma medicine working, eh?
SELECT * FROM Network WITH (NOLUCK)
Ha no I never got on with that. Sends me straight to sleep.
16:48
sounds useful
My wife is quite different in that regard.
Vacations at Paul's!
@PaulWhite so that's how you get hours to yourself!
@PaulWhite: serious question -- would you go to summit if el brento picked up the tab?
16:52
@sp_BlitzErik Why would he do that?
Dunno. What, to speak? Or just hang out and chat.
well speaking is up to you
probably in exchange for a day of brain picking
if you'd rather discuss via email i'll start a thread
@PaulWhite would you prefer Mobile World Congres in Barcelone, BTW it's winter here
WINTER HAS COME!
oh wait, no it's florida, still 83 degrees
16:56
haha Fahrenheit I hope!
yes, and though I'm for Metric, I do believe Celsius is a terrible unit
Kelvin all the way
then now 276.15 k
better than 28.33333
I shouldn't need 6 sig figs
Our pharmacy thermometers show the temperature without decimal digits
27 is too cold and 28 is too hot :(
too much of a range for me
17:01
You can see -0, it's always bizarre
Edit: Since it seems this question got some attention (maybe never asked before or maybe I am doing it wrong?), I will try to explain. The table is the tax rate. One of the tax rates is the default (standard since default is a Postgres command). When a new product is added, the standard tax rate is applied to the product. If there is no standard, the database must either do a guess or all kinds of unneeded checks. The simple solution, I thought, was to make sure there is a standard.
4
Q: Constraint - one boolean row is true, all other rows false

theGtknerdI have a column: standard BOOLEAN NOT NULL I would like to enforce one row True, and all others False. The are no FK's or anything else depending on this constraint. I know I can accomplish it with plpgsql, but this seems like a sledgehammer. I would prefer something like a CHECK or UNIQUE const...

i think i've given paul a conniption
conniption?
don't be a lazy spaniard
Noun: conniption (plural conniptions)
  1. (informal) A fit of anger or panic; conniption fit.
  2. When she came downstairs and saw what her children were eating, she had a conniption.
  3. ...threatened by the conniptions gripping Wall Street (Businessweek Oct.20, 2008)
  4. A fit of laughing; convulsion.
  5. The joke was not that funny, but he went into conniptions laughing.
17:11
that's just lovely
What the literal ef
17:29
@sp_BlitzErik No I just had to service another nested level of interrupt
@PaulWhite i've been a good little spinlock
@sp_BlitzErik You backed off then went to sleep?
except to call mcnets a lazy spaniard, yeah
@sp_BlitzErik Well we can talk about it over email but I can't see how it would make sense for you. What do I know though.
The ghost on that cert is going to haunt @SeanGallardy-Microsoft
17:32
lol
I am just trying to master the cray cray that is the markup language here
@sp_BlitzErik How much time do I get if I chip in $50?
👻👻👻👻👻
probably just a hander, glove on
oh, time
dunno
huh, ghost looks different in Chrome
what's the price for a handshake and a selfie
17:33
Chrome... you must have extra cpu and memory to throw away
free of course unless you're charging me
@SeanGallardy-Microsoft I write very efficient queries, so have plenty of free memory and CPU
Google, however, does not
Though I do have Edge open as well
I swear half of Chrome's code is "new SuperLargeObjectNeverGivingBackMemory[10000]"
don't get me started on Edge
@PaulWhite HOW MUCH MEMORY DO YOU HAVE?!
That's asking for memory pressure, chrome and edge open?!
16 glorious gigabytes, 7.5 free
17:36
This is just with Edge open, 4 tabs
Right, but what were you saving that 55GB for?
Ha ha nice
TBF - outlook is chewing up a bit of memory too
17:39
2 GPUs, look at high roller over here
39 Chrome tabs using 1850MB, Edge 94MB
Not sure why Edge has a 3rd eye...
@SeanGallardy-Microsoft Hyperthreaded to four!
Oh I see you said GPUs.
Well one is on the motherboard, no choice about that.
17:40
I know :) just giving crap
That's FINE then
You could have a good time with hashcat though
Sends me straight to sleep (glaucoma medicine ref)
The radeon's do more hashes/sec than the Geforce
So SSMS hasn't run out of window handles for a couple of days. Time to start saving my work every 30 seconds or so.
17:43
hahaha
but we don't have to worry about memory, the GC takes care of that
says every high level language person ever, right before their app crashes on memory issues
@PaulWhite that started happening to me a bit after upgrading to 17.4
I hope SOS doesn't go the same way
@sp_BlitzErik The odd disconnected/un-connectable session as well?
17:45
@SeanGallardy-Microsoft SQL Operations Studio
become bloatware
Oh, that's dead to me
@SeanGallardy-Microsoft How come?
It is a shame they dropped the cool name (Carbon)
I haven't installed it since
It's like... hey let's take a tool and create the same thing but make it open source and cross plat, but not really do anything better, worse, or different
thanks, no thanks
Right absolutely
"under new management"
17:47
"We disrupted an entire division to bring you THE SAME THING but changed where the buttons are, just to piss you off"
had to include buzz words
no product is worth anything unless it disrupts an industry
What's the new command line tool called again?
mssql-cli or something?
sql-cli
it's SQLCMD but with intellisense
what the hell is that
I installed that and Python for Windows
17:48
get out
You're dead to me
The IntelliSense intrigued me. It was awful. I uninstalled it.
i thought sqlps was the future
Python, who do you think you are - some sort of "data scientist"
Python was required for the sql-cli install
At least I think it was Python
17:49
Python - when you can't code but really want to get that CS credit
Python - why write your own code when you can ask someone to create a library for you
@TomV do you know any on-line (free) service to validate XML-EDI files?
Works as designed
Closed as won't fix
17:52
Migrated to User Voice with votes cleared
:golf clap:
Gym time, bbl
@sp_BlitzErik Mails received thanks. Will read tomorrow; too tired now
:thumbsup:
call getTomorrowsDate()
SELECT TOP (1) WITH TIES Date FROM Dates WITH(READPAST) WHERE 1=1 ORDER BY 1
17:55
@SeanGallardy-Microsoft Only works for dates <= GETDATE()
Otherwise you'd need a READFUTURE hint.
And yes every time you edit that I get pinged again
ahahahahaha
You're welcome
<3
FOR SYSTEM_TIME
See there's another feature I haven't ever used
I wanted to put nolock in there... but...
READPAST requires READ COMMITTED, yes?
(from memory)
17:57
I think technically you can use it in any isolation level
@SeanGallardy-Microsoft get your k2
but it only makes sense if you have locks
"Vitamin K2 supplementation was associated with a 12% increase in maximal cardiac output" whoa
> READPAST can only be specified in transactions operating at the READ COMMITTED or REPEATABLE READ isolation levels. When specified in transactions operating at the SNAPSHOT isolation level, READPAST must be combined with other table hints that require locks, such as UPDLOCK and HOLDLOCK.
that's better than a six pack of weekend prince
There you go
alright bbl
18:02
such a go-getter, hitting the gym on the weekend
That documentation entry is really confusingly worded.
Luckily no one uses readpast.
Such an admission of failure
What's msdbCentral?
long story
IF  EXISTS (

    SELECT 1
    FROM msdbCentral.dbo.backup_worker bw WITH (READPAST)
    WHERE bw.last_log_backup_finish_time < '99991231'
    AND bw.last_log_backup_start_time < DATEADD(MINUTE, -5, GETDATE())
    AND EXISTS (
		    SELECT 1
		    FROM msdb.dbo.backupset b
		    WHERE b.database_name = bw.database_name
		    AND b.type = 'D'
			    )
	    )
Formats OK for me
Weird
18:10
i don't have the magic touch
Use spaces instead of tabs, that might be it
hey pal, i use your sql prompt settings
Yep spaces/tabs is an SSMS setting IIRC
so many levels
Amazing anything ever works frankly
-> zzz
18:16
yes goodnight
gnight
18:37
it's a bummer that any adult needs to be told that
@sp_BlitzErik yeah well he's an 18 percenter
I would guess I'm around 18 too but I'm just skinny
82 kg for 1m 98
speak english, bub
It's not a big ask to convert that youself
@McNets nope
18:56
@TomV not bad
@TomV runner?
Nah just skinny
76 Kg 1.80

« first day (2594 days earlier)      last day (2573 days later) »