查询分页:语句1性能提升10倍多,只是因为多了个top关键字,很不理解啊!!!! 1.查询时间1s内,r_object_id主键 select top 100 * from ( select all doc.r_object_id objid,doc.name,doc.number, doc.cuid, doc.r_creation_date, doc.security, doc.bordline,
查询分页:语句1性能提升10倍多,只是因为多了个top关键字,很不理解啊!!!!
1.查询时间1s内,r_object_id主键
select top 100 * from (
select all doc.r_object_id "objid",doc.name,doc.number, doc.cuid, doc.r_creation_date, doc.security, doc.bordline, doc.twicedline, doc.dline, doc.keynum, doc.creator_name,
doc.security_name, doc.dline_name, doc.pid, doc.modifier_name, doc.tblcount, doc.r_modify_date, doc.prjdefid, doc.voldefid, doc.tabledefid, doc.relation_id,
doc.r_object_type "r_object_type", doc.bcode "bcode", doc.copycount, doc.securityapply, doc.pgholtime, doc.done, doc.disciplineid, doc.disciplineid_name,
tabdef.fieldp2830b1886150468j, tabdef.fieldb7727l1886150454q, tabdef.fields5243t504621622q, tabdef.fieldt3385x504621623d, tabdef.fieldf3763y504621609s, tabdef.fieldk1536t504621614n,
tabdef.fieldr1297k504621621z, tabdef.fieldb5089j1350775945q, tabdef.fieldk5874q1350775954t, tabdef.fieldb2206h1350775945a, tabdef.fieldf4308a1350775949v, tabdef.recid,
CAST(ROW_NUMBER() OVER(ORDER BY doc.r_object_id asc ) as int) as dm_rnum
from ps_fld_doctree_document_sp doc
LEFT OUTER JOIN tabledef00054a9a80001e7d_sp tabdef ON (doc.r_object_id=tabdef.recid) where (doc.keynum like N'aaaaaaaaaaaaaaa%' and ((doc.isdel=0) or (doc.isdel=1)) )
and (doc.i_has_folder = 1 and doc.i_is_deleted = 0)
) dm_inline_view_1
where dm_rnum >= 101 AND dm_rnum
2.查询时间10s内
基本情况查看 网站配置修改 网站模板修改 商品分类添加 管理大分类 管理小分类 修改发货通知 修改客服信息 添加网站公告 添加网站商品 修改批发流程 添加友情连接 管理网站公告 管理网站商品 管理友情连接 未处理订单 已处理订单 查询订单 网站会员信息 查找会员信息 添加管理员 管理网站留言 网站数据备份后台管理页面http://你的域名/admin/login.aspx 初始管理员:cndi
0
select * from (
select all doc.r_object_id "objid",doc.name,doc.number, doc.cuid, doc.r_creation_date, doc.security, doc.bordline, doc.twicedline, doc.dline, doc.keynum, doc.creator_name,
doc.security_name, doc.dline_name, doc.pid, doc.modifier_name, doc.tblcount, doc.r_modify_date, doc.prjdefid, doc.voldefid, doc.tabledefid, doc.relation_id,
doc.r_object_type "r_object_type", doc.bcode "bcode", doc.copycount, doc.securityapply, doc.pgholtime, doc.done, doc.disciplineid, doc.disciplineid_name,
tabdef.fieldp2830b1886150468j, tabdef.fieldb7727l1886150454q, tabdef.fields5243t504621622q, tabdef.fieldt3385x504621623d, tabdef.fieldf3763y504621609s, tabdef.fieldk1536t504621614n,
tabdef.fieldr1297k504621621z, tabdef.fieldb5089j1350775945q, tabdef.fieldk5874q1350775954t, tabdef.fieldb2206h1350775945a, tabdef.fieldf4308a1350775949v, tabdef.recid,
CAST(ROW_NUMBER() OVER(ORDER BY doc.r_object_id asc ) as int) as dm_rnum
from ps_fld_doctree_document_sp doc
LEFT OUTER JOIN tabledef00054a9a80001e7d_sp tabdef ON (doc.r_object_id=tabdef.recid) where (doc.keynum like N'aaaaaaaaaaaaaaa%' and ((doc.isdel=0) or (doc.isdel=1)) )
and (doc.i_has_folder = 1 and doc.i_is_deleted = 0)
) dm_inline_view_1
where dm_rnum >= 101 AND dm_rnum
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号