« first day (315 days earlier)      last day (4559 days later) » 

gbn
8:20 AM
@BenBrocka ...FROM T1 WHERE EXISTS (SELECT * FROM T2 WHERE T1.x = T2.x AND T1.y = T2.y AND T1.z = T2.z)
 
 
6 hours later…
2:01 PM
@gbn Yeah, I forgot about EXISTS and was actually thinking about WHERE IN which I usually use
 
JNK
IN and EXISTS evaluate to the same exec plan in SQL Server 2005+
 
I was trying a full join though since someone suggested that for this sort of situation
Can't IN only match one column to one column in a subquery though?
 
gbn
@BenBrocka in SS, yes
 
I'm comparing a 3 column composite PK
 
JNK
You could use combined IN expressions but EXISTS is much clearer
 
gbn
2:04 PM
What @JNK means is that the plan generated by SQL Server is left-semi-join (when the IN is a subquery, not a constant list)
Like this without the NOT
11
A: The use of NOT logic in relation to indexes

gbn NOT IN (SELECT ...) and NOT EXISTS (SELECT .. WHERE correlation..) are "Anti Semi Joins". That is, recognised set based operations WHERE NOT (MyColumn = 1) is a filter that requires all rows to be looked at For more info, see: Craig Freedman's "Introduction to Joins" Wikipedia "Relational a...

 
Oh, yeah, that would work
 
gbn
@JNK this would match any value in any row
Not the combination of the 3 in one row in t2
 
JNK
ERG
yeah use the EXISTS
:)
 
I have to recreate this table to test anything anyway. Our old table didn't copy the full PK...I don't even know how this worked. It's an incomplete copy of another table on another DB
Without the full PK there's no way to make sure I get 100% of and only the correct rows best I can tell
 
JNK
How did you get a partial table like that?
 
2:14 PM
We made it. It was part of an access database. It's a small chunk of a largeish table. Since the original data isn't ever updated through the app and performance is a big issue I'm keeping the partial table for now
it's kind of a stupid use case but it's what we've been doing
 
 
1 hour later…
3:37 PM
"on the heap"
G'day folks
 
howdy
 
Hello
 
gbn
howdo
 
how's everyone doing today?
 
gbn
near my end of day. thinking when to go home :-)
 
3:50 PM
@gbn I, too, am a thinker.. A muller of decisions, if you will, @gbn ...
@gbn But this one.... This requires no thinking. Just leave ;-)
 
gbn
@MikeWalsh Billing my 8 hours + some good will :-)
 
@gbn Yes there is that, I suppose. :-)
Alright. I am going to run along and get connected to an environment, just wanted to pop in. I wish you the best in that "when to leave" decision process, @gbn :-)
 
@BenBrocka I can't help myself :p
 
@jcolebrand For a moment I thought I had drug you to the UX side but then I noticed you were just referring to your earlier question
 
4:13 PM
Hm. I have a 3,000,000 row table and I only need a specific subset of data. Do I A) make a select statement that only includes relevant data or B) select * the whole table and process the entire result set as a file RBAR?
Why are these people allowed to touch databases?
 
dang, i thought you were the one asking...was going to laugh at you
 
Lol. I'm looking at the program I'm replacing. It's doing B.
It's selecting 30 columns too many and it only needs 1/10th of the rows it's catching to boot
 
My record breaker was a web page that executed 750 queries to produce a list of 10 vehicles. Epic fail.
 
@MarkStoreySmith We have a page that does up to three queries per day in a single month, but I've removed most of the stupid stuff on our website
 
Although just recently I found a query that produced reads totalling 45GB on a 10GB database
 
4:17 PM
nice
 
Quote from individual concerned "well it works dunnit"
 
I want to run this program just to see how long it takes. but there's no dev version...
This is your brain on MS Access
@MarkStoreySmith What did they do, find the largest table and perform multiple self joins?
 
@BenBrocka Just for starters, 10+ inner joins to one table with different join conditions
Ugly database but the querying was just plain special
 
Why do some people have a lethal fear of NULL?
2
 
Relational zealots
 
4:21 PM
If you replace NULL with some made up value that just makes it a massive pain to find anything that should be NULL
 
Some of the conversations @gbn has got into on that topic are good reading.
 
Best part is the vendor database replaces NULL with ''
So now OUR program goes in and replaces '' with made up crap
 
@BenBrocka Nice :)
Embrace the null, for it is good.
 
Now instead of NULL licence numbers we have, for all intents and purposes, a bunch of trucks with the license # "NO LCNS"
Must be a vanity plate
 
gbn
@BenBrocka "No Lycanthropes"
 
4:28 PM
Any "techy" podcast recommendations from you folk? Have been listening to SO and Hanselminutes on the evening stroll home, quite good.
 
gbn
I can't walk and listen at the same time. Music for me
Easier for me :-)
 
@gbn Instant star for that one!
 
I'm gonna have an aneurysm if I start to understand WTF they're doing to this poor database
 
gbn
Seriously: Not just hearing musci but listening to a techie discussions
Not quite as bad as texting while driving but some old dear would get trampled
 
@BenBrocka A developer at one of my clients was named Anurag, shortened to Anu. Once he left and we looked closely at the quality of his work, we coined "anu-rysm" as the inhouse catch phrase for dodgy code.
@gbn Man on a mission when on the move
 
4:32 PM
I miss being able to walk around campus and listen to podcasts
Now I have to drive everywhere like an adult
 
gbn
@MarkStoreySmith I'll qualify. Walking, listening and lady joggers is too much
 
gbn
4:44 PM
Does anyone personalyl know of a Data Warehouse built on MySQL
without Kickfire, Infobright, whatever
 
@gbn don't know of any
 
Note to self, never look at these people's code, do everything from the ground up.
 
@ben are you a consultant or just get a new job?
 
"New" (4 months) job, haven't looked into their VB code much before now
Their PHP was a mess but salvageable thanks to the framework. This is...this is just wrong
I was going to see how they dealt with edge cases to make sure the new app works the same as the old one. It's not good.
One of their programmers was a COBOL programmer and one was an IT support person who had never used a database or programming language before this job
 
5:03 PM
@BenBrocka You learn as much, perhaps more, from exposure to the wrong way of doing something.
 
@MarkStoreySmith I've certainly learned a lot...I just wish they had learned it instead
 
@BenBrocka Also, as critical as I can be of crud when I see it, I'm acutely aware that it's much easier to point out a better way of doing something than it is to get it right first time.
@BenBrocka Keeps you in work though right? :)
 
@MarkStoreySmith For now =p I wanted UX, not programming which is kind of what I'm doing now
Mostly programming with lots of DBA and some support for truly terrible ERA software
@MarkStoreySmith CRUD as in just SQL in general or what?
 
i don't think he meant it as CRUD
 
Oh, that makes more sense then. Refactoring and doing things right isn't really THAT hard. They just taped something together and forgot about it about 500 times too often
 
5:11 PM
Crud as in turns the fan brown, rather than SQL CRUD
 
Half of their crud is just fixing other crud quick fixes
it's like a duct tape Eiffel Tower
2
 
5:31 PM
brent ozar is doing a web session right now about how SO scales with SQL Server
 
It's asking for a password
 
@MarkStoreySmith You have to register.. then click the "take me there" (or whatever) link
 
bah, gotcha
 
@MarkStoreySmith only too me a couple seconds :-)
enjoy
 
of course java has to be updated as well!
 
5:43 PM
This sounds like an excellent user experience =p
 
hehe, made it in at last
 
this caching stuff is cooooool
 
1
A: Blogoverflow blog anyone? If you want to help with the DBA.SE blog, here's the signup list?

Nick ChammasEdit this post as you feel is appropriate. Blog Post Requirements Peer review: Post must be reviewed and approved by at least 2 other dba.se editors. Rep/badge requirements (?): 1,000 rep On topic: Anything on topic for the main site.

 
@jcolebrand Good luck with the blog stuff
 
@BenBrocka you should help us! :D
 
5:57 PM
@jcolebrand it's not UX...
 
hahahahaha
 
@jcolebrand I wouldn't know what to say =p
 
me either ;-)
 
that's actually going to be my blogpost contribution: "Hey guyz, not sure what to say, just saying hi!"
 
I'm gonna fight the fight for #5 with my boss.
 
6:07 PM
plays the final fantasy 4 boss theme
 
My company's still at the level of "if you publish that a competitor might gain an advantage" for something like a better development process, or a tuning technique.
anyway
lunch time
 
@nick same here actually :( (about the company/competitor philosophy)
 
 
1 hour later…
7:13 PM
@DTest Well I'm glad I don't have that problem...at the same time I don't have anything to publish either =p
 
crap, is that the merge replication HA guy?
 
@MarkStoreySmith Doesn't he have that same question three times now?
 
Variants of it yes.
Inventing a solution to a problem that doesn't exist with a technology that doesn't apply. Good luck!
Have one of these arriving for evaluation tomorrow, techy fun! secure.dnuk.com/systems/rs6600.php
 
@mark jealous
all i saw was the picture before typing that...just looks fun :)
 
@MarkStoreySmith Awesome! I think that's about all our company has in total...
 
7:31 PM
Have tried persuading the client that something smaller with SSD, or local SSD would be better (its for a dev/test hyper-v cluster) but they won't trust SSD yet sigh
 
in storage, not the actual setup
 
@BenBrocka At least he's moved on to Transactional Replication now... Less room for him to screw things up now.
 
gbn
Did you see datagod's answer to earlier Q?
 
@MikeWalsh Didn't read all of it. If he's at least changing his approach/learning I guess that's alright...
 
7:32 PM
Think I've cut the costs of their new dev environment from £250k to ~£100k so far. That covers the cost of keeping me around for a while longer!
 
@BenBrocka Well he at least learned to not mention HA this time ;-)
 
@MarkStoreySmith Mechanical parts are just so much more trustworth-click clickclickclickclick
 
@gbn Brilliant :)
 
gbn
@MarkStoreySmith kudos to @datagod dba.stackexchange.com/questions/7871/…
 
Let's just hope he isn't a consultant for some hospital that one of us relies on or an airline scheduling system, eh?
 
7:35 PM
@gbn I don't know much about replicaiton at all, but I guess that's why we're still on SS 2005, we use replication with a vendor app
 
@DataGod get in here, we want to pat you on the back
 
gbn
@BenBrocka long time since I've done it.
What I do know it isn't for HA/DR
 
@MikeWalsh It's worse than that. I think he mentioned in an earlier question something about a boat/ship and sensor systems!
The reason he's doing all of this is because HA is critical
 
@MarkStoreySmith I wonder if it's Penny's father still looking for the island
 
Never gonna find it on that chaps boat!
@StanleyJohns Hope you don't mind, I edited in a PLE check to your answer.
 
8:12 PM
@gbn do you want to put the "duh" comment on the PLE/latch question or shall I? :)
 
gbn
insufficient data
16
Q: What is PAGEIOLATCH_SH wait type in SQL Server?

RyanI have a query that is taking a long time in the middle of a transaction. When I get the wait_type of the process it is PAGEIOLATCH_SH. What does this wait type mean and how can this be resolved?

 
I'm done with him. Two Qs here, zero votes on his own or any other Qs
 
gbn
this from Quassnoi is most likely the cause
 
8:43 PM
thank you @JackDouglas for the tag cleanup
 
microsoft is EEEVIL
 
Back later chaps, tara
 
@DTest Awesome for B&B, heard abouit that recently
 
@mark bye
 
@MarkStoreySmith byebye
 
8:55 PM
@ben yeah, those patents are funny though :)
 
Not funny to me
 
Hey GBN, what info do you need...
 
9:47 PM
lol @DTest
 
See you folks later. Get to take off early today!
 

« first day (315 days earlier)      last day (4559 days later) »