个人感觉应该用集群,分担数据库压力。
------解决方案-------------------- 数据库的同步复制 分发 订阅等
------解决方案-------------------- 短期内对mssql进行性能瓶颈识别和优化 长期对数据库表结构进行重新规划和调整 mssql的高可用性很少可以做到负载均衡
------解决方案-------------------- 增大内存,控制最大连接数量。 http://wenku.baidu.com/view/5f4012a1b0717fd5360cdcbb.html
------解决方案-------------------- 首先找到 最耗CPU的top50 SQL SELECT total_cpu_time, total_execution_count, number_of_statements, s2.text --(SELECT SUBSTRING(s2.text, statement_start_offset / 2, ((CASE WHEN statement_end_offset = -1 THEN (LEN(CONVERT(NVARCHAR(MAX), s2.text)) * 2) ELSE statement_end_offset END) - statement_start_offset) / 2) ) AS query_text FROM (SELECT TOP 50 SUM(qs.total_worker_time) AS total_cpu_time, SUM(qs.execution_count) AS total_execution_count, COUNT(*) AS number_of_statements, qs.sql_handle --, --MIN(statement_start_offset) AS statement_start_offset, --MAX(statement_end_offset) AS statement_end_offset FROM sys.dm_exec_query_stats AS qs GROUP BY qs.sql_handle ORDER BY SUM(qs.total_worker_time) DESC) AS stats CROSS APPLY sys.dm_exec_sql_text(stats.sql_handle) AS s2