Windows Service slowing down server?

  • We have a Windows Service with the job of running misc operating system tasks. It gets its jobs from a table in the SQL server, and queries it every 15 seconds to see if anything needs done.

    The table is indexed (querying the table is pretty quick), the SQLConnection is a class variable (in other words, not recreated every 15 seconds, just opened/closed every 15 seconds).

    Another team member was leery about the load this may put on the server. Would we be better off redoing the Windows Service to pull it's jobs from a directory on the network, polling the network every 15 seconds instead?

    Any gut feelings you have, please let me know.

    Thanks!

    Kurt

  • We've done it the same way (jobs listed in database) and it worked fine. Not too terribly significant a load on the server.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • I would be concerned about opening/closing a connection every 15 seconds. If you are using connection pooling and/or not actually closing the connection, then not much to worry about. However, if you are actually opening/closing the connection - that can have an impact.

    Nothing wrong with having a connection open all the time.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Sounds reasonable. Thanks!

  • You're welcome.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

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

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