Forum Replies Created

Viewing 15 posts - 10,936 through 10,950 (of 49,552 total)

  • RE: connections with status set to 'sleeping'

    Sessions that are sleeping are not doing anything, therefore they cannot be currently using CPU. A session that is currently using CPU is in the RUNNING state.

    SOS_Scheduler_Yield is not an...

    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 prevent NULL values

    Define the column as not nullable and specify a default or use ISNULL(<column name>,0) when querying.

    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: Poor query performance

    Stale stats or bad plan in cache to be honest.

    The optimiser has no knowledge of fragmentation, so that won't change plans, usually when rebuild fixes query problems it's actually 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: Poor query performance

    No. Updating stats on the table updates all the stats on that table, index and column.

    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: changing collation for a database

    bala2 (11/14/2013)


    We have more than 50 tables on that database.

    Is there any other way to do that or

    TO change the collation all at a time.

    If you want to change...

    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 this a bad habit i need to clean up after?

    Ed Wagner (11/14/2013)


    If your nonclustered has other columns included, it could prove useful in some queries, but since all nonclustered indexes inherit the value from the clustered index anyway, why...

    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: Poor query performance

    Are you sure that updating stats with fullscan doesn't help? Changes in estimated rows before/after is usually indicative of statistics-related problem (or bad parameter sniffing).

    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 this a bad habit i need to clean up after?

    It doesn't make much sense usually. There are edge cases where the narrow nonclustered index can be useful because it's narrower and hence faster to use, but that requires specific...

    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 reduce the joins in sql querry

    Bhuvnesh (11/14/2013)


    mpradeep23 (11/13/2013)


    how do i join tables with out joins

    You can .... for that you have to do table level changes like merging two tables (which contains parent-child...

    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: changing collation for a database

    All the alter database does is change the default collation that new objects will use. If you want to change existing objects, you need to run an ALTER TABLE ALTER...

    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: Performance related Question

    Not enough information.

    Please post table definitions, index definitions and actual execution plan (as a .sqlplan file)

    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: Index hint on query

    Remove the hint unless there is no other way to get the optimiser to choose the index that you know to be best, you know why the index you're hinting...

    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: Trigger To Prevent a User From Inserting a Blank Column

    I still recommend considering a check constraint instead of the trigger.

    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: Trigger To Prevent a User From Inserting a Blank Column

    That said, a check constraint would probably be a better choice than a trigger here.

    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: Trigger To Prevent a User From Inserting a Blank Column

    Your trigger is checking the entire table, not the rows just inserted. So if there's any blank values anywhere in the table, the trigger will fail. You probably want 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

Viewing 15 posts - 10,936 through 10,950 (of 49,552 total)