Forum Replies Created

Viewing 15 posts - 1 through 15 (of 16 total)

  • Reply To: Make SQL Server Agent Jobs HADR Aware

    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...

  • Reply To: Failed allocate pages

    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,...

  • Reply To: Calculate the Days Between First and Last Orders

    Yes, amount of first and last customer purchase would require a different solution. Sorry for my rant then.

  • Reply To: Calculate the Days Between First and Last Orders

    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?

  • RE: Backup to Recovery

    I concur, that was an interesting question.
    Even though I answered it wrong 🙂

  • RE: Interviewing Avatars

    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...

  • RE: Correct index strategy for BETWEEN

    This is pretty clever and will work even on overlapping intervals pretty fast - at least until someone inserts interval (minint, maxint) 🙂

  • RE: Correct index strategy for BETWEEN

    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,...

  • RE: Correct index strategy for BETWEEN

    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...

  • RE: Correct index strategy for BETWEEN

    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,...

  • RE: The Copy Cat Poll

    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...

  • RE: The High Availability Poll

    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.

  • RE: Create Database

    Ok, I got it wrong after reading the books online specifically on that subject. I agree, with single log file, both answers are correct.

  • RE: Query Notification in MS SQL 2012

    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...

  • RE: Query Notification in MS SQL 2012

    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...

Viewing 15 posts - 1 through 15 (of 16 total)