« first day (3226 days earlier)      last day (1646 days later) » 

1:26 AM
morning
 
 
4 hours later…
5:15 AM
Morning
 
 
1 hour later…
6:26 AM
Morning
 
6:50 AM
Morning
 
7:27 AM
user image
4
 
 
1 hour later…
8:44 AM
@JamesL Don't tell me. Currently looking at an environment that is doing the same.
CacheType            Total Plans          Total MBs                               Avg Use Count Total MBs - USE Count 1                 Total Plans - USE Count 1
-------------------- -------------------- --------------------------------------- ------------- --------------------------------------- -------------------------
Adhoc                158677               6055.606506                             2             3097.497131                             124332
Prepared             1355                 120.953125                              199           74.875000                         
Morning
Watched the rugby final. Enjoyed the Guinness and the pizza after the game. Have to say: Springbocks were the better team.
 
Morning
 
9:09 AM
Morning all
 
9:23 AM
@TomV ha!
 
10:08 AM
Moaning
 
 
2 hours later…
12:35 PM
Hi all - and good afternoon.Items tags and stuff

I'm trying to "track down" a question and I hope that I can get some help here - there was a part of the answer that I didn't quite grasp and I wanted to pursue it, but I've lost the post.

It was to do with items and tags. The OP's question was about items and tags and a set (say (1, 2, 3)).

Something like CREATE TABLE stuff (item TEXT, tag INT) INSERT INTO stuff VALUES ('a', 1), ('a', 2), ('a', 3), ('x', 1), ('x', 2), ('s', 1), ('s', 1), ('s', 2), ('s', 3), ('s', 4);
 
@Vérace This is in the Relational Division category of problems, and as OPs are often unaware of the term, we sometimes add the tag to the question to help categorise the problem properly. You could try looking through those if you haven't already
Anyway, I think the HAVING usually uses COUNT rather than MIN in these cases. Something like HAVING COUNT(*) = (SELECT COUNT(*) FROM ...) where the subquery selects from some kind of a reference table, possibly filtered too
COUNT(*) = (SELECT COUNT(*) FROM ...) for an exact count, and COUNT(*) = somenumber for a required minimum of matches, I guess
 
 
2 hours later…
2:34 PM
Seen in the interwebs today ...
Augustine's laws were a series of tongue in cheek aphorisms put forth by Norman Ralph Augustine, an American aerospace businessman who served as Under Secretary of the Army from 1975 to 1977. In 1984 he published his laws. The book and several of the laws were the topic of an article in Sound and Vibration magazine in March 2012. == List == Law Number I: The best way to make a silk purse from a sow's ear is to begin with a silk sow. The same is true of money. Law Number II: If today were half as good as tomorrow is supposed to be, it would probably be twice as good as yesterday was. Law Number...
 
Bullshit (also bullcrap) is a common English expletive which may be shortened to the euphemism bull or the initialism B.S. In British English, "bollocks" is a comparable expletive. It is mostly a slang term and a profanity which means "nonsense", especially as a rebuke in response to communication or actions viewed as deceptive, misleading, disingenuous, unfair or false. As with many expletives, the term can be used as an interjection, or as many other parts of speech, and can carry a wide variety of meanings. A person who communicates nonsense on a given subject may be referred to as a "bullshit...
Claasen's logarithmic law of usefulness is named after technologist Theo A. C. M. Claasen, who introduced the idea in 1999 when he was CTO of Philips Semiconductors: Usefulness = log(Technology)The law can also be expressed as: Technology = exp(Usefulness) == Examples == System parameters (e.g. RAM, CPU speed, disk capacity) need to increase by a multiple to create a noticeable impact on performance. In the case of RAM, by the law, a 256MB unit is only 1/8 more practically useful than a 128MB unit though the base unit has doubled. It would require a 16384MB (128 × 128MB) unit of RAM to truly...
 
3:26 PM
I've got a question for you guys that almost certainly doesnt belong on DBA:
How do you work with a boss who writes like this:
 
@James promote him so he doesn't write code anymore?
5
 
lol, apparently I replaced a guy who would just get mysteriously angry all the time
every time I try and rewrite this stuff, I get pushback
and i really hate reading this style. idk if I should just deal or not
 
@James just let him fail?
 
well, i'm the one who has to work with the code, so it is me that's failing
or appearing to fail
and its starting to become an issue
 
@James just do it from scratch?
don't know what else can you do...smack him a couple of times?
 
3:35 PM
yea, I think I should do that more
LOL
 
Publicly available Managed Instance pricing can be used to calculate the cost of CPU usage. Send him a bill.
 
the computing resources dont bother me that much, but I'm pretty sure our brains just work differently
 
@James How would you rewrite that? Could you show the boss the original and your rewrite side to side to demonstrate the advantages of the latter? Assuming the advantages are easy to see or at least require minimum effort to explain/outline (and hence understand).
 
the easy change is taking out all the nested queries and re-writing them as cte's
then, there's a lot of chunks that get re-used for different projects, so I'd like to make them views
 
I meant that as a question that you could try answering for yourself :)
 
3:43 PM
oh, yea, I normally do rewrite them
but the more I re-write them, the less other people trust them
 
But I agree, there's a lot of repetitive code there that could be eliminated using nesting
 
I could make it 100x better, and the actuaries will say "we want your boss's code"
also, change the code to do X, Y, Z
 
Ah, so there's more people that prefer your boss's style to yours, I didn't realise that at first, sorry.
 
lol I didn't say, but honestly nobody else knows the difference
 
@James show them his code, but actually use yours
so if there is an issue you can also blame your boss
 
3:48 PM
LOL, it's genius
 
@James But you yourself probably know it. You should try explaining how yours is better. E.g. more repetition in code means more time for making changes in those parts of the code, and the increase is not linear, because not only you have to repeat the same change to cover all the duplicated bits, but you have to take some time to make sure you've indeed covered them all. And there's still chance you will omit some, which is another point: duplication in code makes it more prone to mistakes.
 
yea, and its me that takes the blame for it, which is starting to wear on me.
 
It boils down to productivity and effectiveness
Or efficiency
 
@JamesL ALTER DATABASE [YOUR_DB] SET PARAMETERIZATION FORCED
 
@Johnakahot2use Yep, it didn't help in this case. I was surprised. The plans don't get auto-parameterized.
 
4:11 PM
I would start with making some regression tests that take the output of both and compare them so that you can show confidence in your refactoring. And also time the differences between runs.
 
5:07 PM
@James Produce some test evidence as you go, showing the results matching between old and new. If the old one is wrong, do a write-up showing what was wrong with it. Then you just show the test evidence.
The trouble with actuaries is they often know just enough about programming to be dangerous but not enough to be useful.
 
meanwhile someplace over there: boingboing.net/2019/11/03/bock-bock-bock.html
 
@dezso Is the lad who purchased those chickens not going to eat at least some of the 20 he's keeping. The issue is more about them being humanely slaughtered than about them being used for food. If it's not endangered, then using animals as food presents no problems for most people!
 
 
4 hours later…
8:53 PM
@Vérace he is looking for partition by ID and then order by date
 
 
1 hour later…
10:17 PM
@ypercubeᵀᴹ Jesus - how could I have been so stupid? I think I got side-tracked with the replacement of the contact_date field and lost focus on the actual answer - motes and beams! :-) Thanks for pointing out my error! What a muppet... Final answer now correct.
 
 
1 hour later…
11:23 PM
Thought for the day: You can really tell when your on-line banking app has a micro-service back-end, and not in a good way.
It's academic anyway. The site is down and has been all evening.
 

« first day (3226 days earlier)      last day (1646 days later) »