Wait stats OLEDB and others

  • I have a server which is hardly used most of the time but for a few hours a night there is huge activity with 5 or so minutes on the hour for those periods where activity is huge and SQL querys take an extensive amount of time to compile.

    From my understanding conclusions cannot be drawn from SQLTRACE_BUFFER_FLUSH and LAZYWRITER_SLEEP ?

    As for SOS_SCHEDULER_YIELDthe processor % is below 50 across all CPU and the processor queue length stays below 1 for these peak periods. So there doesn’t seem to be a CPU problem.

    Memory stays good available memory is stable at 4 GB’s buffer cache 100% recompiles 0

    1)So what conclusions can be drawn from my wait stats?

    2)What does the high MAX_wait for the OLEDB mean?

    Many thanks

    Waiting_taskwait_time_msMax_wait Signal

    SQLTRACE_BUFFER_FLUSH1475595903109841956271031

    LAZYWRITER_SLEEP60529859028590616328306625

    SOS_SCHEDULER_YIELD2054586118958101516125189577359

    PAGEIOLATCH_SH7824061 164688250164061754515

    OLEDB3667490676890156274530

    PAGEIOLATCH_EX3679075 7162465616328405343

    WRITELOG5075655 2417264051715092062

    PAGELATCH_EX1239983121708484425017953000

  • The lazywriter is supposed to sleep a lot. That's why it's called lazy. 😉 There are a fair few wait types that should just be ignored.

    As for the OLEDB wait, I'd conclude you're using linked servers a lot.

    Is there a particular problem that you're investigating 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
  • Hi , This is a virtual server not sure what difference that will make?

    But in answer to your questions there are no linked servers, so how else would I get OLEDB waits?

    The problem is that during these high usage peeks some queries take a very long time which cause the application which is querying the DB to time out ( As I don’t have any high lock waits I presume there must be a bottle neck) , I will run perfmon counters to see what is happing with the disk ,cpu and memory.

    But I am trying to get more familiar with wait stats to see if I can draw any conclusions from it I see no lock’s CPU or memory pressure. So I just want to see how much I can gain from the wait stats and to figure out why I have OLEDB waits (server was restarted a few days ago)

    Many thanks

  • Looks like we're in the same boat.

    I'm also looking into reducing OLEDB waits.

    Here are some links I've found that might help you out.

    http://www.sqlservercentral.com/blogs/sql_server_dba/2011/10/15/sql-wait-type-_1320_-oledb-and-how-to-reduce-it/

    http://www.sqlservercentral.com/blogs/kyle-neier/2008/12/03/oledb-wait-stats-in-sql-server-2005/

    http://www.dbadiaries.com/the-oledb-wait-type-and-how-to-reduce-it

    http://www.sqlskills.com/blogs/paul/wait-statistics-or-please-tell-me-where-it-hurts/

    I'm pretty sure my OLEDB waits are caused by views using linked servers or other DBs. Looking into ways to better this but can't find any decent info on Views with linked servers and / or other DBs and the alternatives.

    Replication might be my only option.

    Hope the links help you out.



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply