SQL Server Performance

Slo performance with Cluster+TS+SAN

Discussion in 'SQL Server 2005 General DBA Questions' started by Akthar, Aug 9, 2007.

  1. Akthar New Member

    Hi guys.
    i have the following structure:
    SQL Server Std 2005 with latest updates
    WINDOWS 2003 with latest updates
    8 GB RAM - 2 quad Core CPUs

    The Sql server is in a 2 node cluster and the datas are stored on a SAN. The client is Terminal Services CLients connection through an Application.
    I have a table1 with 600000 records. When i run a query on the sql server, select * from table1 - it tooks about 1 min to get the results
    When i run the same query on a client it takes more that 3 mins.
    How can i bring down the result time on the client
  2. Akthar New Member

    any advice guys
  3. Adriaan New Member

    "The client is Terminal Services Clients connection through an Application."
    As far as I'm aware, applications cannot connect to Terminal Server. What you can have is an application that is published on a Terminal Server machine, that you open from your desktop - but it is running on the TS machine. Or you can start a desktop session on a Terminal Server machine, and then start the application - also running on the TS machine.
    You might have TS running on the same server hardware as the instance of SQL Server. This is a configuration that is known to lead to performance problems, and I would imagine that having a cluster of SQL Server instances may compound that issue.
    Anyway - what type of client application are you talking about, and where is it running?
  4. ghemant Moderator

    Hi Akhtar,
    Have you check for network congestion!!
  5. Akthar New Member

    hi hemant,
    yes i check that , no issu on the network as other things are working fine
  6. ghemant Moderator

    are you querying using QA from client machine?
    The application you are referring to is Via Citrix/Thin client?!! If this is the case I recall it will take a while from the client for the first time, but from second time onwards it doesn't take this much time.
  7. acki4711 Member

    Assuming TS and SQL Server are different machines and appl. is installed and running on TS:
    What is the rowsize of your rows in table1? -> What amount of data has to travel over network to the client? Network peak ?
    What else is running on the terminal server? -> other applications blocking resources like proc, memory or network bandwith?
    What is slow? -> sending select command to sql server, running sql query or receiving the data ?

  8. Akthar New Member

    SORRY i wrongly explained myself. it is indee application installed on the TS server, and users launching the application from the TS server via Ms TS client.
    the TS and the SQL server are different servers. i am not sure if is is the query that is slow or the receiving of data. how can i verufy this?
  9. Adriaan New Member

    Do a remote desktop on the machine that hosts the SQL Server instance, and run the query in QA.
    Compare that time with the time if you run the same query in QA in a TS session.
    Finally, compare both times with the time if you run the same query in QA on your desktop.
    The time for QA running local on the SQL Server machine should be better than for TS or desktop, as no data has to travel across the network. The other two should have similar execution times, assuming they're on the same LAN.
  10. satya Moderator

    Areyou using any user defined scalar functions as This problem occurs because the SQL Server Database Engine query optimizer performs only a few optimizations for the query. This behavior occurs because many of the optimizations that the query optimizer performs are not safe. Therefore, the query optimizer uses an inefficient query plan for the query.
    Relevant blogs fyi:
    LargeVolume rows
    UseofTools for slow performance assessment
    OldThread here
  11. Adriaan New Member

    (Satya, that would have no effect on the different reponse times he's getting when waiting for the query results on different computers.)
    If you really need to get the complete data to be shown on the client computer, then consider using TS on a machine that is wired up directly to the SQL Server computer - check with IT staff if they can arrange that.
  12. satya Moderator

    Different response on different machines, then better to investigate thru network too in addition to digging on current SQL Server for better plans.
  13. Scrubinski New Member

    When you say the query "runs" slower on one computer than another, are you displaying the entire text of the results? If you run the query and just get the record count instead of displaying all the rows are the run times the same? If they are, then I would guess the delay is the time it takes to transfer the text of the results over the network to the remote machine. Another possibility (also network related) is that server that is terminal serviced into is spending more effort on redrawing the terminal service (remote desktop?) display window and is consequently slowing the server down in general, causing the server to take longer.

Share This Page