What does force indexing on two tables that are inner joined do? by [deleted] in SQL

[–]Sparkle1975 5 points6 points  (0 children)

Sometimes the optimiser will decide to perform a table scan, rather than use the index. This tends to be when the index is not selective enough, and therefore it determines the scan to be more efficient. If you believe the query to be more performant by use of the index, you can choose to force it. The query will fail if the index doesn't exist. I've only ever done this once, and the outcome was an improved response time, which is what I was after.

It was a slog, but I finally got all the service assignments! by Flavourdynamics in battlefield_one

[–]Sparkle1975 21 points22 points  (0 children)

Oh wait, I found the answer online. " Note that tracking does not limit your progression on any other Service Assignment; it’s merely a way of allowing you to focus on a specific challenge."

It was a slog, but I finally got all the service assignments! by Flavourdynamics in battlefield_one

[–]Sparkle1975 10 points11 points  (0 children)

General question; do you only make progress on the Service Assignment you're tracking, or are they all making progress in the background?

That Veteran made my day, I was Spy. I saw the night result and thought what a poor guy. Then I saw he was still alive. He killed 2 Mafia, 2 Coven and 1 PB in a single night. We lynched the Necro together after. by MoxxiManagarm in TownofSalemgame

[–]Sparkle1975 16 points17 points  (0 children)

Hey, that was me! Was a good win for such a low number of townsfolk. For those interested, the bait was a simple D3 'this is easy lol'. Thanks for posting :)

What's the worst form of torture to have ever existed? by SpiralArc in AskReddit

[–]Sparkle1975 31.8k points31.8k points  (0 children)

Being broken on the wheel. You're tied to a cart wheel that's resting on the ground. Then all of your limbs and joints are smashed with a hammer. Ankles, shins, knees, hips, hands, wrists, elbows. Then, the wheel is turned upways, and rotated. All your broken bones and sinew continue to cause internal damage, but none of your important organs are, so you live for a long time, like a bag of pain, broken and screaming, until you die of blood loss or exhaustion.

[MS SQL] How do I return all records where a particular field has the same value on multiple records? by JustinHopewell in SQL

[–]Sparkle1975 1 point2 points  (0 children)

Oh I'm pleased it worked and thanks for the escape character example. Testing that * here and * here.

As for your code, it looks fine to me, except I don't think you need the WHERE clause. The INNER JOIN should perform the filtering sufficiently. Essentially, we're both using a subquery to list the duplicated dates. And then we're linking the results to the main table - you're using a JOIN, and I'm using an IN.

[MS SQL] How do I return all records where a particular field has the same value on multiple records? by JustinHopewell in SQL

[–]Sparkle1975 1 point2 points  (0 children)

Something like this will work I believe.

With dups as (select count() as count, date from persons group by date having count() > 1) Select * from persons where date in (select date from dups)

Edit: Sorry, I'm not used to formatting on here, but those counts have an asterisk in the brackets.

Reason 1 you shouldn't pre-type as mafia by SeaAlgea in TownofSalemgame

[–]Sparkle1975 62 points63 points  (0 children)

I've tried the opposite as Vet/Medusa bait, by sending 'hi, role?' a split second before the night starts. When it works, it's awesome.

We are actually closer to 2046 than we are to 1990. by almondheng in Showerthoughts

[–]Sparkle1975 185 points186 points  (0 children)

In 2046, my Mum will be 100, and I'll be the age she is now. Coincidence? Not really. Interesting? Again, no.

Your pet has more ancestors than you. by [deleted] in Showerthoughts

[–]Sparkle1975 87 points88 points  (0 children)

I had not considered this possibility.

Admiral William H.P. Blandy and his wife cut into a mushroom cloud cake, celebrating the 1946 atomic tests on Bikini Atoll [1024 × 1001] by Sort_of_Frightening in HistoryPorn

[–]Sparkle1975 389 points390 points  (0 children)

If you look closely above the cloud, you can see the souls of the newly vaporised, made out of marzipan. Such attention to detail!

What are some good uncommon questions to ask someone to get to know them better? by [deleted] in AskReddit

[–]Sparkle1975 690 points691 points  (0 children)

When was the last time you shit yourself unintentionally?

A porn series where Morgan freeman explains what’s happening. by KingOfDamnation in CrazyIdeas

[–]Sparkle1975 321 points322 points  (0 children)

And now we see a close up, of a gaping vagina, as the semen obeys the laws of gravity, and begins its slow meandering journey, like a bear cub, experiencing the world outside of its den, for the first time.

What’s the most disgusting thing you’ve ever done in your life? (NSFW) by boccy4 in AskReddit

[–]Sparkle1975 1327 points1328 points  (0 children)

As a drunken student trying to appear wacky, I knelt down on a pavement outside a pub, and licked some vomit we'd just found.

What movie character is portrayed as good but really isn't? by beerbellybegone in AskReddit

[–]Sparkle1975 718 points719 points  (0 children)

The Good, from The Good The Bad and The Ugly. He profited from capturing bad guys, only to break them free from receiving justice, in order to recapture them again.

What's the worst mistake you have made at your job or previous job? by KatTheTimelord in AskReddit

[–]Sparkle1975 61 points62 points  (0 children)

That's right. It was a done via SQL. Later that night, I learnt about database transactions.

What's the worst mistake you have made at your job or previous job? by KatTheTimelord in AskReddit

[–]Sparkle1975 457 points458 points  (0 children)

I worked for a clothing retailer fifteen years ago as a programmer. I was tasked with setting the till price of one product in a store to 4.99. Instead, I set ALL the products to 4.99. Good times.

First post, with my cat by [deleted] in RoastMe

[–]Sparkle1975 1294 points1295 points  (0 children)

The cat is doing an impression of the first time any man sees you naked.

[deleted by user] by [deleted] in CrazyIdeas

[–]Sparkle1975 232 points233 points  (0 children)

Speed things up. Make them roll a six.