Forum Replies Created

Viewing 15 posts - 32,146 through 32,160 (of 49,552 total)

  • RE: Need Expert advice on my sql query for speed improvement

    Jeff Moden (6/28/2010)


    ...and the data on each page is also in physical order.

    Not necessarily. Rows on a page don't have to be in any specific order, SQL puts them where...

    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: Triggers

    I would strongly recommend that you do not go that route, it'll lead to horrendously complex triggers, usually needing dynamic SQL, often having difficulty with the inserted and deleted 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: Performance issue got to be done in few hrs need HELP PLZ

    sam-1083699 (6/28/2010)


    Ya I found that we are using SQL STANDARD edition sp2 on Server 1 and Enterprise edition sp2 on Server2 and I can a lot of data load...

    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: Table locked?

    nelsonj-902869 (6/23/2010)


    Do NOT try to 'repair' the table/database without researching what the repair could possibly do to your data.

    stricknyn (6/28/2010)


    Ran the check table with repair and still got 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: Table locked?

    Doesn't sound like corruption, sounds like blocking.

    If you query the table then, in another query window query sys.dm_exec_requests. Find the row that refers to the query that you're running against...

    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 issue got to be done in few hrs need HELP PLZ

    sam-1083699 (6/28/2010)


    How come the same code works differently when i ran on both servers?

    Many possible reasons. Different hardware, different load, different version of SQL, that's just 3 off 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: Why does SQL Server sometimes block on a simple UPDATE?

    Check what the blocking query is. If you ckeck sys.dm_exec_requests, you'll see a columns called blocking_session_id. That's the session_id of the session that's holding the locks that prevent the query...

    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 issue got to be done in few hrs need HELP PLZ

    Remove pieces (joins typically, or complex Where clause predicates) of the query and see what the smallest, simplest portion that you can find that still shows the performance problem.

    Can you...

    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: Securing Tables and Stored Procedures

    David-155102 (6/28/2010)


    I also found that the client application that accesses the database has a load of in-line queries which I suspect is causing the problem.

    Yup, they'll require direct access 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: Restore Transaction Log after Database has been Restored

    Yes

    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: repeating repeating repeating

    bhjodokast (6/28/2010)


    I have images disabled on my browser, maybe that is why it's not showing properly.

    That's precisely why that's happening. The 'strings' that you see are the ALT Text...

    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: check for NULL in a column

    You can use sum because, if you check the code that Gianluca posted, you're summing 1 or 0, 1 if that row is to be counted, 0 if it's 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: Performance issue got to be done in few hrs need HELP PLZ

    Dave Ballantyne (6/28/2010)


    Sure about that Gail ?

    Difference in 2005 / 2008 Perhaps ?

    This profiler trace screen shot is 2005.

    Doesnt Look like the update statistics has invalidated the plan.

    Yes, absolutely sure...

    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 issue got to be done in few hrs need HELP PLZ

    Sam, first thing I'll suggest is that you remove all of your join hints from the query, then see how it performs on the two servers.

    Also, fix the EXISTS, there's...

    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 issue got to be done in few hrs need HELP PLZ

    Dave Ballantyne (6/28/2010)


    The table STOREROOM has an estimated row count of 7 but actual of 250,000+.

    That's a correct estimate.

    7 rows (estimated) * 36876 (number of executions) = 258132 (actual...

    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 - 32,146 through 32,160 (of 49,552 total)