table is slow

  • When I poen a table is very slow, what I should? how can I check why and fix the problem?

  • Krasavita (3/23/2011)


    When I poen a table is very slow, what I should? how can I check why and fix the problem?

    poen???

    Regards
    Sushant Kumar
    MCTS,MCP

  • open - typo. 🙂

    How are you opening the table?

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • Define slow, and how much data are you displaying?

  • Sorry, when I open, I have around 2000 records in that table and I write select statment

  • So you are doing a "select from yourtable" and it is slow in returning the data? Are you watching for any blocking to see if that is causing problems. Also, are you returning this across a slow network to SSMS? 2000 records is not that much to render but it could be something with your local machine. On the toolbar you can click on the button to include client statistics (or under Query > Include Client Statistics). Make sure that it is not a slowdown on the client level.

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • It really depends on the query, the structure of the table, the indexes on the table, the number of users on the system and the queries they're running, memory and CPU configuration of the system... Without anyy of that information, it's hard to tell you why something might be slow.

    2000 rows is a very small table. It should perform reasonably well, again, depending on the information I listed.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Is that particular table only slow to open??

    Try opening any other and compare the time taken.

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • Are there 2000 records in the table, or is 2000 the number returned based on a 'where' clause or join to another table.

  • 2000 records in table total. Nothing wrong with my machine

  • Can you also start your query and then running the following in another connection;

    select session_id, blocking_session_id, wait_type, wait_resource, wait_time, last_wait_type from sys.dm_exec_requests where session_id =

    You will have to get the session_id from the connection running the query to add to this query. Provide back any details that you get from that.

    As Grant stated it could be the design of the table as well, and potentially the indexing. It would be good to share out the table create statement and the query you are running so that we can have a better idea of what is going on.

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • I'm with Grant, 2000 rows is relatively tiny.

    Got LOB data in this? Is the data stored on your local hard-drive or a server? How long is 'long' - Are we talking a second or a minute? Do other queries against the same database go quickly for similar or higher row counts? Can you script the table DDL so we can see the structure? Are you pulling data across a VPN?

    There's a lot of reasons for this, as you can see.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Krasavita (3/23/2011)


    2000 records in table total. Nothing wrong with my machine

    OK. but if you're still looking for an answer, can you supply some more information. Fine, you're pulling 2000 rows, the entire table. You're pretty much guaranteed to get a table scan and there's no real way to speed that up except bigger & faster hardware. What is it that you're trying to do?

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Please read and follow the instructions provided in the second article in my signature block regarding getting help with performance issues.

  • What are the datatypes you are selecting?

    Are you ordering the results; and if so, is that field indexed?

    Director of Transmogrification Services

Viewing 15 posts - 1 through 15 (of 15 total)

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