• christophe.bernard 47659 - Monday, February 12, 2018 8:29 AM

    Hello all,
    we have a database under sql server 2008.
    This db contains some tables and one table contains 600 000 records in our production environments.
    This table is fill by some mobile device who synchronize every x minutes
    All works fine since several months ...

    But friday, i must to check some information on the production system => make some query.
    If begin by made a select * from xxxxxx
    This SELECT takes 1 minutes and 30 seconds ...for to retrieve => 600 000 records

    After several seconds, we notice that the mobile device can't synchronize WHILE the SELECT query isn"t complete ...

    what we sould do ?
    - add memory in our production server ?
    - export old datas for example datas old than 30 days into another system
    - ...

    Or WHAT do you suggest for to avoid that ?
    Is it many (1 minute and 30 second) for to make a select * from xxxx for 600 000 records ?

    Thanks for your explanation guys

    It's pretty simple... stop doing a select that returns all columns of all rows.  Why on Earth are you doing such a thing?  It's not like someone is going to read the information.,

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)