SQL Server Performance

Performance issue in Windows Service

Discussion in 'Non-Transact SQL Developer Performance Tuning' started by ndramkumar, Apr 29, 2006.

  1. ndramkumar New Member

    Hi all,

    I have a windows service which is written in VB.NET. Windows Service reads data from the database, does calculation and stores to database.

    I am having a table which does not have an identity column. But the table is having a composite primary key of 5 different colums.This table contains around 25,000 to 30,000 records for a day.

    So the windows service queries the database and keep all the records (25K to 30K) in memory and due to that the windows service memory usage and cpu usage(100%) is very high and it occupies almost 3/4th memory of RAM. Due to that other applictions are also very slow.

    So for solving this what I thought of is to keep maximum 5000 records in RAM for processing.

    Please can anybody help me to solve this performance issue. Also please let me know what other alternative solution can be implemented.

    Thanks and Regards,
    Ram Kumar N D
  2. spacemonkey New Member

    How often does this service run? Once daily? Also, do the calculations rely on just one row, all for that day, or more?

    My thought is that if you can distribute the processing over time, you can get rid of the high cpu/ram usage. If you are just doing calculations on a row by row basis, you may be able to just let an on insert tirgger run on the database end and do the calculations + inserts.

    The other solution may be to schedule the service to run during a non peak time of the day when the other applications may not be running or it is not important that they run quickly.

  3. Luis Martin Moderator

    How about to tuning that services in same way like any other query?

    Luis Martin

    Although nature commences with reason and ends in experience it is necessary for us to do the opposite, that is to commence with experience and from this to proceed to investigate the reason.
    Leonardo Da Vinci

    Nunca esperes el reconocimiento de tus hijos, eso ocurrirá luego de tu muerte

    All postings are provided “AS IS” with no warranties for accuracy.

  4. mmarovic Active Member

    We need more details. What kind of processing is done by the service?

Share This Page