以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 请教折叠 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=174420) |
-- 作者:hbhb -- 发布时间:2022/1/14 12:48:00 -- 请教折叠 大师:请教功能代码? 在表格折叠的状态下,如何保证任意节点可见,并处于第一可见行?
|
-- 作者:有点蓝 -- 发布时间:2022/1/14 13:35:00 -- http://www.foxtable.com/webhelp/topics/2358.htm |
-- 作者:hbhb -- 发布时间:2022/1/14 13:44:00 -- 解决了,谢谢! |
-- 作者:hbhb -- 发布时间:2022/1/14 14:03:00 -- 请教sql语句的多表连接查询的效率问题: 哪一方法效率高? 1、直接用SQL连接语句查询 2、查询相关表,然后循环写入 比如下面的查询语句,35000行数据,要用5秒,如何优化? s_e_l_e_c_t c.km5,dtkmyeb5,dtkmyeb26,dtkmyeb33,dtkmyeb34,dtkmyeb35,dtkmyeb36,dtkmyeb37,dtkmyeb38,dtkmyeb39,dtkmyeb40,dtkmyeb28,dtkmyeb30,dtkmyeb41,dtkmyeb42, iif(dtkmyeb33 is null,h.pzzb8,iif(dtkmyeb28 is not null,b.pzzb8,d.pzzb8)) as dtkmyeb8, iif(dtkmyeb33 is null,h.pzzb9,iif(dtkmyeb28 is not null,b.pzzb9,d.pzzb9)) as dtkmyeb9, iif(c.km5 = \'借\',iif(dtkmyeb30 is null,0,dtkmyeb30) + iif(dtkmyeb33 is null,iif(h.pzzb8 is null,0,h.pzzb8),iif(dtkmyeb28 is not null,iif(b.pzzb8 is null,0,b.pzzb8),iif(d.pzzb8 is null,0,d.pzzb8))) - iif(dtkmyeb33 is null,iif(h.pzzb9 is null,0,h.pzzb9),iif(dtkmyeb28 is not null,iif(b.pzzb9 is null,0,b.pzzb9),iif(d.pzzb9 is null,0,d.pzzb9))) , iif(dtkmyeb30 is null,0,dtkmyeb30) - iif(dtkmyeb33 is null,iif(h.pzzb8 is null,0,h.pzzb8),iif(dtkmyeb28 is not null,iif(b.pzzb8 is null,0,b.pzzb8),iif(d.pzzb8 is null,0,d.pzzb8))) + iif(dtkmyeb33 is null,iif(h.pzzb9 is null,0,h.pzzb9),iif(dtkmyeb28 is not null,iif(b.pzzb9 is null,0,b.pzzb9),iif(d.pzzb9 is null,0,d.pzzb9)))) as dtkmyeb10, dtkmyeb18,dtkmyeb20,dtkmyeb19,dtkmyeb22,dtkmyeb21,dtkmyeb23 from (((dtkmyeb a left join (s_e_l_e_c_t pzzb6,pzzb59 As pzzb100,sum(pzzb8) As pzzb8,sum(pzzb9) As pzzb9 from dtpzzb where pzzb142 Is not null and pzzb59 Is not null And cint(pzzb3) <= 1 group by pzzb6,pzzb59 Union All s_e_l_e_c_t pzzb6,pzzb61 As pzzb100,sum(pzzb8) As pzzb8,sum(pzzb9) As pzzb9 from dtpzzb where pzzb142 Is not null and pzzb61 Is not null And cint(pzzb3) <= 1 group by pzzb6,pzzb61 Union All s_e_l_e_c_t pzzb6,pzzb63 As pzzb100,sum(pzzb8) As pzzb8,sum(pzzb9) As pzzb9 from dtpzzb where pzzb142 Is not null and pzzb63 Is not null And cint(pzzb3) <= 1 group by pzzb6,pzzb63 Union All s_e_l_e_c_t pzzb6,pzzb65 As pzzb100,sum(pzzb8) As pzzb8,sum(pzzb9) As pzzb9 from dtpzzb where pzzb142 Is not null and pzzb65 Is not null And cint(pzzb3) <= 1 group by pzzb6,pzzb65 Union All s_e_l_e_c_t pzzb6,pzzb67 As pzzb100,sum(pzzb8) As pzzb8,sum(pzzb9) As pzzb9 from dtpzzb where pzzb142 Is not null and pzzb67 Is not null And cint(pzzb3) <= 1 group by pzzb6,pzzb67 Union All s_e_l_e_c_t pzzb6,pzzb69 As pzzb100,sum(pzzb8) As pzzb8,sum(pzzb9) As pzzb9 from dtpzzb where pzzb142 Is not null and pzzb69 Is not null And cint(pzzb3) <= 1 group by pzzb6,pzzb69 Union All s_e_l_e_c_t pzzb6,pzzb71 As pzzb100,sum(pzzb8) As pzzb8,sum(pzzb9) As pzzb9 from dtpzzb where pzzb142 Is not null and pzzb71 Is not null And cint(pzzb3) <= 1 group by pzzb6,pzzb71 Union All s_e_l_e_c_t pzzb6,pzzb73 As pzzb100,sum(pzzb8) As pzzb8,sum(pzzb9) As pzzb9 from dtpzzb where pzzb142 Is not null and pzzb73 Is not null And cint(pzzb3) <= 1 group by pzzb6,pzzb73 Union All s_e_l_e_c_t pzzb6,pzzb75 As pzzb100,sum(pzzb8) As pzzb8,sum(pzzb9) As pzzb9 from dtpzzb where pzzb142 Is not null and pzzb75 Is not null And cint(pzzb3) <= 1 group by pzzb6,pzzb75 Union All s_e_l_e_c_t pzzb6,pzzb77 As pzzb100,sum(pzzb8) As pzzb8,sum(pzzb9) As pzzb9 from dtpzzb where pzzb142 Is not null and pzzb77 Is not null And cint(pzzb3) <= 1 group by pzzb6,pzzb77 ) b on b.pzzb6 = a.dtkmyeb5 And b.pzzb100 = a.dtkmyeb28) left join dtkm c on c.km7 = a.dtkmyeb5) left join (s_e_l_e_c_t pzzb6,sum(pzzb8) As pzzb8,sum(pzzb9) As pzzb9 from dtpzzb where pzzb142 Is not null And cint(pzzb3) <= 1 group by pzzb6) d on d.pzzb6 = a.dtkmyeb5) left join (s_e_l_e_c_t pzzb12 ,sum(pzzb8) as pzzb8,sum(pzzb9) as pzzb9 from dtpzzb where pzzb142 is not null and cint(pzzb3) <= 1 group by pzzb12) h on h.pzzb12 = a.dtkmyeb26 |
-- 作者:有点蓝 -- 发布时间:2022/1/14 14:34:00 -- 我看的是一脸懵,没有办法提供什么建议 |
-- 作者:hbhb -- 发布时间:2022/1/14 15:23:00 -- 这个意思: 比如:企业提供的SQL数据库备份,还原后,后台数据库大部分是3NF范式,这样必然要多表连接查询,那么查询效率哪种方法高? 销售表中的产品列,价格列,负责人列,员工列,购买方等列信息都是单表存储的。那么 1、直接用SQL的连接查询语句,查询出销售表 2、分别读取各表,用语句更新写入 以上两种方法哪个快? 我的感觉应该是第一种快,为何测试时,有的是第二种快? 是否是笛卡尔乘积的原因?还是其他什么原因?
|
-- 作者:hbhb -- 发布时间:2022/1/14 15:56:00 -- 比如:有的特大型企业,一个月的凭证量,就有10万多份,而凭证表的关联表有10多个,有的表几千行,甚至上万行。必须分月加载,才能得到数据。 目前我们用的软件,都非常的慢,有的都废弃了。如果狐表能在此方面有个飞跃,那就厉害了。
|
-- 作者:有点蓝 -- 发布时间:2022/1/14 16:08:00 -- 数据达到一定的量,需要算法和硬件的支持,不是foxtable能够解决的问题了 |