Forum Replies Created

Viewing 15 posts - 15,136 through 15,150 (of 49,552 total)

  • RE: ORDER BY Should be same as my input in IN()

    Josh Ashwood (12/20/2012)


    Can you imagine all the little humble

    SELECT Foos

    FROM FooBars

    statements out there in the wild that would just stop working if Microsoft made the semi-colon a requirement in 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: Remove blocking due to LCK_M_S and LCK_M_U

    Tune the query (may include some rewriting)

    If that doesn't work, consider one of the snapshot isolation levels

    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: Adding new data file to tempdb, leads to data incorrection

    Bhuvnesh (12/20/2012)


    OK thanks for explanation . can you please explain the phrase

    We Added a Tempdb Data File, and Data Was Wrong

    from http://www.brentozar.com/archive/2011/08/tempdb-multiplefiles-sort/

    Why don't you read the blog post?...

    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: Adding new data file to tempdb, leads to data incorrection

    Depends what you mean by 'not in order'

    Neither parallelism, nor multiple tempDB files are going to result in a query with an order by returning data out of order. Any...

    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: Unwanted parameter truncation

    pdanes (12/19/2012)


    GilaMonster (12/19/2012)


    pdanes (12/19/2012)


    But what about such a table as a parameter? No business logic, but at least the fields would be strongly typed. I don't know if I would...

    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: Unwanted parameter truncation

    pdanes (12/19/2012)


    But what about such a table as a parameter? No business logic, but at least the fields would be strongly typed. I don't know if I would get 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: Unwanted parameter truncation

    pdanes (12/19/2012)


    But I just though of another way to pass parameters. What about a separate, one-record table?

    Multiple users.

    Maintenance (removing unneeded rows, what if the proc fails before it does...

    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: SELECT query with "Writes" ?!

    Then that order by shouldn't need a sort. Unless there's maybe parallelism. Really need to see the exec plan

    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: Unwanted parameter truncation

    pdanes (12/19/2012)


    Don't you get a performance hit from passing a table over the network, rather than a single string? And I think the server would parse it a lot faster...

    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 Performance Problems

    Jon.Morisi (12/19/2012)


    If I were in your shoes I'd start with addressing the CXPACKET waits by modifying Cost threshold for parallelism and Max Degree of Parallelism because that's a relatively easy...

    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: Unwanted parameter truncation

    pdanes (12/19/2012)


    GilaMonster (12/19/2012)


    I'm going to be unpopular here but...

    Dependency analysis?

    Regression testing?

    Unit tests?

    Sure, making all parameters and variables varchar(max) would work. Shall we make all table columns varchar max too (if...

    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: Unwanted parameter truncation

    pdanes (12/19/2012)


    I declare varchar(100) to be safe, then I change the calling logic, or add some padding or delimiters, or some such, and suddenly I'm over 100.

    I'm going 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: Database Restore issues

    Rather disable the VM backup (or just the SQL portion of it). In general you should not have two separate technologies doing SQL backups. Everything in SQL or everything in...

    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: Filtered indexes issue -URGENT HELP REQUIRED

    There's no way around that.

    A filtered index for deal_date > '20120401' cannot satisfy a query WHERE deal_date > @YStartDate because of the parameterisation.

    The plan is cached and reused. The optimiser,...

    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: SELECT query with "Writes" ?!

    stryk (12/19/2012)


    What's the definition of the pk?

    PK and Clustered Index is on this field "No_" (varchar(20))

    Please post the definition of the pk (the SQL statement to create 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

Viewing 15 posts - 15,136 through 15,150 (of 49,552 total)