如何在Sql Server中的排序列上获得性能 [英] How to get Performance on Sort Column in Sql Server

查看:93
本文介绍了如何在Sql Server中的排序列上获得性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题。我在数据库中有一个百万条记录。我需要通过Column对这些数据库进行排序。现在需要9秒来对100万条记录进行排序。但是我需要性能。我如何获得性能。任何帮助都是值得的。



先谢谢

解决方案

数百万条记录肯定会花费超过一秒的时间来加载。



不要这样做。加载较少的数据。还记得按需加载吗?



在显示数据时使用分页/过滤。



在数据库中。

SQL Server 2005分页结果 [ ^ ]



在前端

GridView多重过滤器AJAX控件 [ ^ ]

重复分页和分页功能 [ ^ ]



查看本系列的数据库优化

< a href =http://www.codeproject.com/KB/database/Opt imizeDBUseIndexing.aspx>优化SQL Server中数据访问的十大步骤:第一部分(使用索引) [ ^ ]

在SQL Server中优化数据访问的十大步骤:第二部分(重新考虑TSQL并应用最佳实践) [ ^ ]

优化SQL Server中数据访问的十大步骤:第III部分(应用高级索引和非规范化) [ ^ ]

返回顶部在SQL Server中优化数据访问的10个步骤:第IV部分(诊断数据库pe性能问题) [ ^ ]

在SQL Server中优化数据访问的十大步骤:第五部分(优化数据库文件并应用分区) [ ^ ]

I have a problem. I have one Millions records in database. I need to sort these database by Column.Now It take 9 seconds to sort the one million records.But I need performance.How Can I get Performance.Any help is appreciable.

Thanks in Advance

解决方案

Millions records surely'd take more than bunch of seconds to load.

Don't do that way. Load less data. Remember "Load on demand"?

Use paging/filtering while displaying the data.

In database side
SQL Server 2005 Paging Results[^]

In frontend
GridView Multiple Filter AJAX Control[^]
Repeater with Paging and Sorting Features[^]

Check this series for database optimization
Top 10 steps to optimize data access in SQL Server: Part I (use indexing)[^]
Top 10 steps to optimize data access in SQL Server: Part II (Re-factor TSQL and apply best practices)[^]
Top 10 steps to optimize data access in SQL Server: Part III (Apply advanced indexing and denormalization)[^]
Top 10 steps to optimize data access in SQL Server: Part IV (Diagnose database performance problems)[^]
Top 10 steps to optimize data access in SQL Server: Part V (Optimize database files and apply partitioning)[^]


这篇关于如何在Sql Server中的排序列上获得性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆