locked
Database RRS feed

  • Question

  • select

     

    * fromWkOrders --> Total Records 472178 But taking time near about 47 sec. Why?
    Friday, January 13, 2012 10:38 AM

Answers

  • > Total Records472178 But taking time near about 47 sec. Why?


    try to look at the execution plan of a query.
    see Graphical Execution Plan Icons (SQL Server Management Studio)
     
     

    Friday, January 13, 2012 12:05 PM
  • How long will it take if you check 'Discard Results after execution a query? (Menu Query/Query Options/ Results)
    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog

    That's a handy option :).

    Otherwise when executing a query just to see a sample of the table, consider using the TOP() expression. This is otherwise a simple query with only one way to execute (table/index scan), so this is what it takes for the server to scan, copy to memory, transfer to client. I had this question at work once, why a "select * from ..." took such a long time, it showed that the table was about 10 GB :).

    Cheers

    Sunday, January 15, 2012 4:36 PM

All replies

  • > Total Records472178 But taking time near about 47 sec. Why?


    try to look at the execution plan of a query.
    see Graphical Execution Plan Icons (SQL Server Management Studio)
     
     

    Friday, January 13, 2012 12:05 PM
  • I am looking at an invisible "Vote as Helpful" button on Malobukv's response.  I clicked on it and it seemed to take, so I know it is there, but I still cannot see it.  The mouse over seems to be finding it still, it just doesn't show.

    EDIT:

    Yes, it took, because when I tried to click on it again, it showed, "You cannot vote again."

    Friday, January 13, 2012 1:08 PM
  • "works for me!" (and i see it too)
    Friday, January 13, 2012 1:34 PM
    Answerer
  • Same as Brian -- I see it and it works for me.

    - Doug
    Friday, January 13, 2012 6:28 PM
  • How long will it take if you check 'Discard Results after execution a query? (Menu Query/Query Options/ Results)
    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog
    Friday, January 13, 2012 6:33 PM
    Answerer
  • I am looking at an invisible "Vote as Helpful" button on Malobukv's response.  I clicked on it and it seemed to take, so I know it is there, but I still cannot see it.  The mouse over seems to be finding it still, it just doesn't show.

    EDIT:

    Yes, it took, because when I tried to click on it again, it showed, "You cannot vote again."

    Hi, i can see it, however the "Propose As Answer" is gone on every answer in this thread. Is this by design?

    Cheers
    Istvan
    Sunday, January 15, 2012 2:14 PM
  • Hi, i can see it, however the "Propose As Answer" is gone on every answer in this thread. Is this by design?

    Cheers
    Istvan


    Yes. If a thread is created as "discussion" then you can't propose or mark a reply as answer.
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    --------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------------------------------------------------------------------
    My Blog | Team Blog | @Twitter
    Sunday, January 15, 2012 4:10 PM
  • How long will it take if you check 'Discard Results after execution a query? (Menu Query/Query Options/ Results)
    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog

    That's a handy option :).

    Otherwise when executing a query just to see a sample of the table, consider using the TOP() expression. This is otherwise a simple query with only one way to execute (table/index scan), so this is what it takes for the server to scan, copy to memory, transfer to client. I had this question at work once, why a "select * from ..." took such a long time, it showed that the table was about 10 GB :).

    Cheers

    Sunday, January 15, 2012 4:36 PM