@ErikReasonableRatesDarling No, you'd need the user ID for the delete vote
I don't recall if flags are recorded in the public dump, but if they are that might be a helpful approximation. Mod deletes without a flag are relatively rare.
The query below is using the StackOverflow2010 sample database:
DECLARE @Id INT = 18471
SELECT c.UserId FROM dbo.Comments AS c
INNER HASH JOIN dbo.Users AS u
ON c.UserId = u.Id
AND c.UserId = @Id
With a hash join hint, it returns the following error:
Query processor could not produce a query p...
One interesting consequence of that being you can't get an estimated plan with OPTION(RECOMPILE) but the query runs successfully and produces an actual plan
@ErikReasonableRatesDarling Yep, good recollection
@PaulWhite i had recorded a video on join algorithm limitations, and that was one that i covered. but i didn't then and don't now have a good grasp on why it works in some cases but not others.
@ErikReasonableRatesDarling Well, it's like when SelOnSeqPrj only worked for literals. It's easier, and that was considered the main case. Eventually, after many years, they got around to enhancing Filter pushing past a suitable Window function for variables as well as literals. Maybe someone influential got to them
Sort of a funny story, I had a sales call with someone doing that, and when I brought it up they adamantly defended it being okay because of the AG. Didn’t hear from them again until a year later when a different person at the company wanted help recovering lost data.
It was not on any of the other AG nodes for some reason.