惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Cisco Talos Blog
Cisco Talos Blog
C
Check Point Blog
博客园_首页
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Martin Fowler
Martin Fowler
Recorded Future
Recorded Future
S
Security @ Cisco Blogs
L
LINUX DO - 最新话题
博客园 - 司徒正美
P
Privacy International News Feed
G
Google Developers Blog
I
Intezer
Hacker News - Newest:
Hacker News - Newest: "LLM"
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
C
Cybersecurity and Infrastructure Security Agency CISA
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
K
Kaspersky official blog
I
InfoQ
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
Webroot Blog
Webroot Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
大猫的无限游戏
大猫的无限游戏
D
Docker
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
Microsoft Azure Blog
Microsoft Azure Blog
Spread Privacy
Spread Privacy
量子位
H
Hacker News: Front Page
Simon Willison's Weblog
Simon Willison's Weblog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
SecWiki News
SecWiki News
S
Security Affairs
Latest news
Latest news
人人都是产品经理
人人都是产品经理
C
CERT Recently Published Vulnerability Notes
S
Security Archives - TechRepublic
V
Visual Studio Blog
T
Troy Hunt's Blog
S
Secure Thoughts
F
Fortinet All Blogs
V
V2EX
The Register - Security
The Register - Security
J
Java Code Geeks
MongoDB | Blog
MongoDB | Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

博客园 - FrankFei

创采人力资源管理软件--产品简介 创采e-HR荣获江苏省高新技术产品认定 个人经典收藏网址 创采人事档案管理系统(ASP.NET+ExtJS) 创采应用框架开发平台--CFrame 创采人事管理软件--分布式的人力资源管理解决方案 创采e-HR合作经营 创采人事管理软件 创采人力资源管理系统 使用.Net和ExtJS技术开发的人力资源管理系统 ObjectBuilder中WeakRefDictionary使用模式浅析 ObjectBuilder应用之TypeMappingPolicy、SingletonPolicy ObjectBuilder中IBuilderPolicy和IBuilderStrategy之区别 ObjectBuilder模式浅析 NHibernate连接多数据库字符定义问题 名言警句 折叠内容 [转]NUnit2.0详细使用方法 设计模式--Prototype
优化GridView的查询、翻页性能
FrankFei · 2007-07-30 · via 博客园 - FrankFei

最近在工作中使用到了GridView这个控件,很好用,可当绑定数据量较大时,就会有性能问题,经过分析,找到了一种可以解决这个问题的方法,其实质是下面的SQL(Oracle)语句:

select a.*
  from (select rownum as row_id, b.*
          from (select * from table_name order by column_name asc) b) a
 where a.row_id between record_begin_index and record_end_index

其中table_name表示需要查询的表名,column_name是要排序的列名,record_begin_index是要显示的表中第record_begin_index行的开始位置,record_end_index是要显示的表中第record_end_index行的结束位置,如果我想查询表中第101行到120行的数据,上面where后的语句就是:a.row_id between 101 and 120。

当然上面的SQL语句最好能写成Procedure,再结合.NET Framework 2.0中的ObjectDataSource就可以了(关于ObjectDataSource的使用,网上有很多例子,这里就不赘述了)。