Viewing 15 posts - 1 through 15 (of 16 total)
Nice piece of code. We just manually added first step to all HADR-sensitive jobs to check whether the used database is primary (sys.fn_hadr_is_primary_replica) and to raise error if not. The...
October 22, 2020 at 9:58 am
The error seemed to be caused by large SQL command via linked server (another SQL server selected a big chunk of data from our SQL server). Once this was eliminated,...
October 19, 2020 at 8:18 am
Yes, amount of first and last customer purchase would require a different solution. Sorry for my rant then.
February 3, 2020 at 12:12 pm
Or you could do it totally old school by MIN(OrderDate), MAX(OrderDate) and GROUP BY CusomerID. And it would be faster, too.
Is there any reason to overcomplicate things?
February 3, 2020 at 11:54 am
I concur, that was an interesting question.
Even though I answered it wrong 🙂
November 8, 2018 at 2:25 am
I don't think this would fly if I was the one holding the interview. The avatar isn't going to write the code, the person is. Also. with the avatar being...
May 11, 2018 at 2:28 am
This is pretty clever and will work even on overlapping intervals pretty fast - at least until someone inserts interval (minint, maxint) 🙂
March 24, 2015 at 11:02 am
Statistics updated with fullscan, no change - still estimated 1 rows, actual 87k. I don't know why sql server chooses this plan, really, But, since the intervals do not overlap,...
March 24, 2015 at 7:51 am
Auto update for statistics is not disabled; they are even manually updated in a nightly maintenance job, however, the query does not want to use the PK index. I guess...
March 24, 2015 at 6:25 am
Ok, I am sorry; here are the execution plans. The first one is without any hints, the second is with FORCESCAN on GeoIpBlock. FORCE ORDER hint produces the same plan,...
March 24, 2015 at 4:27 am
We have just:
- production database
- developer database, copied from production database once a month
Backups are managed by our sysadmin and are stored god knows where. 6 developers on the...
August 3, 2012 at 7:55 am
Highly available database is a must for us (a large eshop). We used failover clustering but are going to move to AlwaysOn in a few weeks.
June 29, 2012 at 4:40 am
Ok, I got it wrong after reading the books online specifically on that subject. I agree, with single log file, both answers are correct.
June 21, 2012 at 3:15 am
RBarryYoung (5/28/2012)
I'm not sure which of your alternatives would be best then. My instinct would be to start with the RowVersion one, but that's just a SWAG.
Your instinct was...
May 28, 2012 at 12:32 pm
I am aware of that article and even acknowledge that the optimalization in QN is good - it's just that the old way was more useful for a caching engine.
Ours...
May 28, 2012 at 2:44 am
Viewing 15 posts - 1 through 15 (of 16 total)