Forum Replies Created

Viewing 15 posts - 3,451 through 3,465 (of 49,552 total)

  • RE: The datepart microsecond is not supported by date function dateadd for data type date.

    yb751 (3/15/2016)


    Is this what you are really trying to do?

    Probably not. He's probably trying to use an = for the upper end of a date range, which isn't the best...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Which will be better composite index or single indexes?

    vivekgrover44 (3/15/2016)


    At the time of index creating, above mentioned points came into my mind that what should be deciding factor for this case.

    You can't create useful indexes based only...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: The datepart microsecond is not supported by date function dateadd for data type date.

    DATE is a date without a time component. Therefore you can't subtract microseconds from it.

    SET @End_Date = DATEADD(DAY ,7 ,@The_Date)

    and then instead of using BETWEEN @Start_Date and @End_Date, rather...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Which will be better composite index or single indexes?

    Without seeing the queries that run against the table, absolutely no way to say.

    http://sqlinthewild.co.za/index.php/2010/09/14/one-wide-index-or-multiple-narrow-indexes/

    http://sqlinthewild.co.za/index.php/2009/01/19/index-columns-selectivity-and-equality-predicates/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Are the posted questions getting worse?

    Ed Wagner (3/15/2016)


    GilaMonster (3/15/2016)


    Brandie Tarvin (3/15/2016)


    In a change of subject, anyone else find it odd that someone would claim that the proper way of doing a SQL thing is a...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Memory recommendation

    Grant Fritchey (3/15/2016)


    CXPacket is only a concern if you also see other CPU waits.

    I tend to worry about it if I also see parallelism-related latch waits. But that's worry to...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Are the posted questions getting worse?

    Brandie Tarvin (3/15/2016)


    In a change of subject, anyone else find it odd that someone would claim that the proper way of doing a SQL thing is a workaround and not...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: stored procedure pass value in the parameters

    I don't understand the request, can you be clearer please?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Memory recommendation

    sunny.tjk (3/14/2016)


    Could PAGIOLATCH_XX waittypes be a good indication?

    It's an indication of buffer pool churn. Whether that's due to insufficient memory, bad queries or poor indexing is another matter.

    Oh, and CXPacket...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: 2 SQL Tracefiles on startup

    alno (3/14/2016)


    You guys wouldn't happen to know if turning it off requires a SQL restart

    Before you turn it off, make sure it isn't required by your company's audit or security...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Need help with an error that blocks almost all DDL statementhe s server-wide

    Someone's implemented a DDL trigger somewhere, and it's broken.

    Check in Object Explorer. Each DB, programability, triggers or Server Objects-> triggers for server-wide triggers (which is probably more likely where this...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Operand type clash: date is incompatible with int

    It's coming from this fragment: @TheDate -1

    You can't add or subtract integers from a DATE variable. Try DATEADD(dd,-1,@TheDate) in both places where that occurs

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Thread Allocation

    Threads are required to process logins.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Asynchronous mirroring

    Not offhand, no. You'll probably need a job that runs every (x) minutes, checks the state and then takes any necessary action. Won't be much overhead if it does nothing...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Asynchronous mirroring

    2) Because the log records still have to be sent to the secondary. If they could be removed from the log before being sent to the secondary, then you'd have...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 3,451 through 3,465 (of 49,552 total)