Forum Replies Created

Viewing 15 posts - 48,496 through 48,510 (of 49,552 total)

  • RE: Blocking by -2 in Query Window

    Spid -2 is normally caused by orphened DTC transactions. I get them often from some JDBC queries. I can't think of any reason you should gt them from a select...

    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: Top n Used with Order by & performance

    I do have a full time job, as does just about everyone else who answers questions here. I'll look at your stuff when I have a few minutes free

    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: dynamic WHERE clause, Performance issue

    Have you considered indexed views to replace your derived tables? It will result in a slow down of inserts/updates but that trade off may be acceptable considering your reporting needs. 

    Is session_id...

    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: Procedure and Temporary Table

    It is possible what you're trying to do, but the other way around. this works

    CREATE PROCEDURE p1 AS

    CREATE TABLE #Temp (...)

    EXEC p2

    GO

    CREATE PROCEDURE p2 AS

    SELECT * FROM #Temp

    GO

    It doesn't work...

    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 Tuning Guide

    Kimberley Tripp's blog and articles

    http://www.sqlskills.com/blogs/kimberly/

    http://www.sqlskills.com/articles.asp

    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: dynamic WHERE clause, Performance issue

    Wow.

    OK, I haven't read through all of that, maybe over lunch, but one thing caught my eye

    IF

    @GroupLevel

    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: Top n Used with Order by & performance

    Index on Field1 in Table2, including Field3 if it is necessary to return that. You say that Field2 is the pk. Is it the clustered index as well?

    An order by...

    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: dynamic WHERE clause, Performance issue

    Could you post one of the offending queries please, as well as the existing indexes on the tables.

    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: Return rows by AND/OR

    Just be aware that that kind of catch-all query is extremely prone to poor execution plans, due to parameter sniffing with varying parameters.

    Also, the query optimiser tends to mis-read the multiple...

    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 do I identify movements form one level to another

    Please don't make multiple posts about the same issue

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=338&messageid=394156

    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: Top n Used with Order by & performance

    You can use an index hint, however, I can guarentee to you that forcing the index on field2 will make the query worse.

    Your sort and your join are both on...

    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: Linked server connection error

    Have you applied the following hotfix recently?

    KB899587 (http://support.microsoft.com/kb/899587/en-us)

    When we uninstalled that fix, the linked servers started working again. No idea why at this point.

    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 by t-sql the cluster property

    Since it's a pk, you'll need to drop the constraint, not the index

    ALTER TABLE <tablename> DROP CONSTRAINT <pk name>

    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: N th Maximum Value

    To see how the query is executing, take a look at the execution plan. It's very hard to look at a query and say how it will execute

    From a quick...

    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: Top n Used with Order by & performance

    However, unless you're 100% sure you know what you're doing, you may make the query even slower.

    Take a look at the exec plan, see what indexes are been used, and...

    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 - 48,496 through 48,510 (of 49,552 total)