Forum Replies Created

Viewing 15 posts - 1,486 through 1,500 (of 49,552 total)

  • RE: Do you need an order by when selecting TOP N from a clustered index?

    DesNorton - Wednesday, April 26, 2017 4:14 AM

    ORDER BY is expensive as it requires a SORT.

    Not necessarily. If there's an index...

    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: Do you need an order by when selecting TOP N from a clustered index?

    No ORDER BY, no guarantee of order. End of story.

    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: Deadlock with two update statements

    It looks like you edited the deadlock graph to take the object and index names out, unfortunately that's made it hard to see what's going on. Can you either edit...

    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: Composite Index VS Unique Non Clustered Index

    That table just has a 2-column primary key. It's now the designers of the database set it up. It probably shouldn't be  (The SalesOrderDetailID column is unique by itself iirc),...

    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: SQL Server core usage

    You really should sort the VM configuration out.

    You can 'just' upgrade to Enterprise edition, but 16 cores of Enterprise licenses will be quite a bit more expensive than...

    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: SQL Server core usage

    Google for "SQL Server edition hardware limits" and you should get the comparison page (it's what I do any time I need it)

    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: Should-I-Type-Star-or-1-With-the-EXISTS-Logical-Operator

    Hugo Kornelis - Monday, April 24, 2017 4:04 PM

    GilaMonster - Monday, April 24, 2017 3:40 PM

    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: Is High availability group the way to go?

    SQL Server in VMs in Azure or Azure SQLDB?

    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: Should-I-Type-Star-or-1-With-the-EXISTS-Logical-Operator

    Hugo Kornelis - Monday, April 24, 2017 9:33 AM

     And scanning a table with 1,000 integer columns takes more time, because the...

    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: sys.dm_db_index_usage_stats no data for older tables in a database

    alen teplitsky - Monday, April 24, 2017 2:28 PM

    I guess they only appeared in the report because of replication updating them.

    Yup.

    The DMV...

    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: sys.dm_db_index_usage_stats no data for older tables in a database

    An index will only have an entry in that DMV if it's been used at least once, for anything, since SQL Server last started.

    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: expensive key lookup

    Estimated executions: ~19000, actual executions: 0. In that plan they key lookup is not worth removing as it's not doing anything.
    Why you've got such bad estimates for row counts...

    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?

    GilaMonster - Monday, April 24, 2017 2:50 AM

    Hugo Kornelis - Monday, April 24, 2017 2:39 AM

    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: How to take database backup between 2 dates (database partitioning)?

    No easy way to do that, and you will have to take into account all sorts of conflict problems when you do it.

    What happens if a row was...

    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: How to take database backup between 2 dates (database partitioning)?

    You mean a backup that only contains data between when it's taken and some previous point in time?
    That's a differential backup, but it won't do what you want, as...

    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 - 1,486 through 1,500 (of 49,552 total)