优化笔记:jsyhjkzqxx_D_20140916.gz

有几张表没有权限,所以跑不起来。

目测黄色部分比较坑爹,死了n多脑细胞才看懂,又死了n多脑细胞才改出来。对5034进行了2次扫描,并多次分组排序求和。(分组和排序算法相对来说比较耗性能)

改为只扫描一次,一次编号操作。

 

这个没有什么既定的规则,就是使劲想各种奇葩办法简化。(这个改写就是利用了oracle在排序的时候,把null当成无穷大。而在sqlserver上就不适用了,因为sqlserver在排序的时候把null当无穷小)

 

黄色部分可改为下面的代码。

select *

FROM (select f1_5034,

decode(min(rn_a) - 1, 1, 0, min(rn_a) - 1) ylqk,

min(rn_b) - 1 bbqk

from (select case

when nvl(f25_5034, 0) > 0 then null

else rn end rn_a,

case

when f25_5034 Is not Null then null

else rn end rn_b,

f1_5034

from (Select f1_5034,

f3_5034,

f25_5034,

row_number() Over(partition By f1_5034 Order By f3_5034 Desc) rn

From wind.tb_object_5034

Where f3_5034 Like ‘%1231‘))

group by f1_5034)

where bbqk is not null

--------------------原代码-------------------------

Select fdate,zqdm,zqmc,jysc,xzjq,dqsyl,fsynx,ffxjg,fpmje,fsqpmlv,ffxcs,ffxfs,fscfxr,

fssdd,fjxqsr,jxjzr,fxgm,cqxypj,dqxypj,‘NULL‘ gjxypj,jhht,fldzrdb,ffxgsdm,fgsjc,zqlx,nvl(bbqk,0) bbqk,fxrq,

Case When nvl(zzc,0)<>0  Then 1 Else 0 End As xxplqk,ylqk ylqk,

hxzbczl,zzc,jzc,DbrXyPj,rzzt,shzt,‘1‘ lsyjs,Jjbz, cxsmc, cxqsr,cxjzr,bjyy,lvlx,syyhdb,FCqXypj,FDqXypj,FGjxypj,FGnxypjJgd,FGjxypjJgd,DCqXypj,

‘NULL‘ DGjxypj,flvjz,‘NULL‘ FYsSyr, ‘0‘ fsdq ,‘NULL‘ fsdqsr ,‘NULL‘ fsdjzr ,‘NULL‘ Fsdjzr2 ,fjcjq,flljq, ‘1‘ ffxzt,flvjzlb,‘1‘ Ffxlx, fdbrdm,fdbr,Fdbrxz,FdbrSnmJzc,fsndgncqxy,Fdbrgnpjjg,

Ffxrlb,fzgr,fzgjzr,x.f13_5015 fzgbl,x.f12_5015 fzgjg, ‘NULL‘ fzgzqdm,fsfsh,‘NULL‘ fjkyy,fdbrzt,fggxx,

(Select F68_1854

From wind.tb_object_1854 T

Where nvl(BbQk, 0) >= 1

And F1_1854 = F25_4516

And F4_1854 = ‘合并报表‘

And substr(F2_1854, 5, 8) = ‘1231‘

And f2_1854 = (Select Max(f2_1854)

From Wind.tb_object_1854

Where T.f1_1854 = f1_1854

And substr(F2_1854, 5, 8)=‘1231‘

And f4_1854 = ‘合并报表‘)) fsnlr,

(Select F68_1854

From wind.tb_object_1854 T

Where nvl(BbQk,0) >= 2

And F1_1854 =F25_4516

And F4_1854 =‘合并报表‘

And substr(F2_1854, 5, 8) = ‘1231‘

And f2_1854 = (Select substr(Max(f2_1854),1,4)-1||‘1231‘

From Wind.tb_object_1854

Where T.f1_1854 = f1_1854

And substr(F2_1854, 5, 8)=‘1231‘

And f4_1854 = ‘合并报表‘)) fqnlr,

(Select F68_1854

From wind.tb_object_1854 T

Where nvl(BbQk,0) >= 3

And F1_1854 =F25_4516

And F4_1854 =‘合并报表‘

And substr(F2_1854, 5, 8) = ‘1231‘

And f2_1854 = (Select substr(Max(f2_1854),1,4)-2||‘1231‘

From Wind.tb_object_1854

Where T.f1_1854 = f1_1854

And substr(F2_1854, 5, 8)=‘1231‘

And f4_1854 = ‘合并报表‘)) fdqnlr,

(Select F140_1853

From wind.tb_object_1853 T

Where nvl(BbQk, 0) >= 1

And F1_1853 = F25_4516

And F4_1853 = ‘合并报表‘

And substr(F2_1853, 5, 8) = ‘1231‘

And f2_1853 = (Select Max(f2_1853)

From Wind.tb_object_1853

Where T.f1_1853 = f1_1853

And substr(F2_1853, 5, 8)=‘1231‘

And f4_1853 = ‘合并报表‘))  FsnmfxrNav

,  Ffxrdchqyz

From (

(SELECT to_char(&PlanTime - 1, ‘YYYYMMDD‘) fdate,

f1_4516 zqdm,

f2_4516 zqmc,

f43_4516,

f25_4516,

f40_1429,

Case

When f12_4516 = ‘上交所‘ Then ‘1‘

When f12_4516 = ‘深交所‘ Then ‘2‘

When f12_4516 = ‘银行间‘ Then ‘3‘

Else ‘4‘ End As jysc,

Case

When f2_1639 = to_char(&PlanTime - 1, ‘YYYYMMDD‘) Then f5_1639

Else  0

End As xzjq,

Case

When f2_1639 = to_char(&PlanTime - 1, ‘YYYYMMDD‘) Then  f3_1639 Else Null End As dqsyl,

Case

When f2_1639 = to_char(&PlanTime - 1, ‘YYYYMMDD‘) Then  f9_1639

Else  0

End As fsynx,

f8_4516 ffxjg,

f7_4516 fpmje,

f5_4516 fsqpmlv,

f9_4516 ffxcs,

Case

When F10_4516 = ‘4‘ Then  ‘1‘

When F10_4516 = ‘0‘ Then  ‘2‘

When F10_4516 = ‘1‘ Then  ‘3‘

When F10_4516 = ‘2‘ Then  ‘4‘

When F10_4516 = ‘3‘ Then  ‘5‘

Else  Null  End As ffxfs,

(Select Min(f8_1270)  From wind.tb_object_1270  Where F1_1270 = F43_4516) fscfxr,

Case f13_4516

When ‘上交所‘ Then ‘H‘

When ‘深交所‘ Then ‘S‘

When ‘银行间‘ Then ‘Y‘

Else Null End As fssdd,

f3_4516 fjxqsr,

f4_4516 jxjzr,

F26_4516 * 100000000 fxgm,

Case

When f47_1429 Is Not Null Then  ‘1‘

Else ‘0‘ End As jhht,

Case

When F48_1429 = ‘不可撤销连带责任担保‘ Then ‘1‘

End As fldzrdb,

f25_4516 ffxgsdm,

f24_4516 fgsjc,

Case

When F17_4516 = ‘321‘ Then ‘1‘

When F17_4516 = ‘333‘ Then ‘3‘

When F17_4516 = ‘322‘ And F29_1429 Is Null Then ‘2‘

When F17_4516 = ‘322‘ And F29_1429 = ‘公司债‘ Then ‘11‘

When F17_4516 = ‘322‘ And F29_1429 = ‘中期票据‘ Then ‘13‘

When F17_4516 = ‘323‘ And F29_1429 <> ‘可分离转债‘ Then ‘4‘

When F17_4516 = ‘323‘ And F29_1429 = ‘可分离转债‘ Then ‘12‘

When F17_4516 = ‘310‘ And F29_1429 Is Null Then ‘6‘

When F17_4516 = ‘310‘ And F29_1429 Is Not Null Then ‘14‘

When F17_4516 In (‘331‘, ‘340‘) Then ‘7‘

When F17_4516 = ‘341‘ Then ‘8‘

When F17_4516 = ‘342‘ Then ‘9‘

Else ‘0 ‘

End As zqlx,

f20_4516 fxrq,

Case

When F29_1429 = ‘可转债‘ Then

‘中国证券监督管理委员会‘

When F4_1090 = ‘Q‘ And F29_1429 Not In (‘中期票据‘, ‘短期融资券‘) Then

‘发展和改革委员会‘

Else ‘NULL‘

End As shzt,

Case

When (F32_1429 Like ‘%铁路%‘ And F47_1429 = ‘2002638‘) Or

(F32_1429 Like ‘%三峡%‘ And F47_1429 = ‘2002650‘) Then  ‘1‘

Else   ‘0‘  End As Jjbz,

nvl((Select t.ob_object_name_1020 From Wind.tb_object_1020 t

Where f27_1429=t.ob_object_id),‘NULL‘) CxsMc,

f15_4516 cxqsr,

f16_4516 cxjzr,

Null bjyy,

Case

When f34_1429 = ‘贴现‘ Then   ‘贴现债券‘

When f11_1429 = ‘固定利率‘ Then ‘固定利率‘

When f11_1429 = ‘累进利率‘ Then ‘浮动利率-固定利率‘

When f11_1429 = ‘浮动利率‘ Then ‘浮动利率-市场利率‘

Else  Null End As lvlx,

Case

When f48_1429 = ‘不可撤销连带责任担保‘ Then  1 Else  0 End As syyhdb,

NVL((SELECT f4_1703 - f39_1429

FROM wind.tb_object_1703

Where f1_1703 = f1_1429

And f3_1703 = (SELECT Min(f3_1703)

FROM wind.tb_object_1703

Where f1_1703 = f1_1429)),0) flvjz,

NVL(f15_1639,0) fjcjq,

NVL(f16_1639,0) flljq,

Case

When f47_1429 Is Not Null Then  f47_1429 Else ‘N‘ End As fdbrdm,

Case

When f34_1018 = F47_1429 Then ob_object_name_1018 Else ‘N‘ End As fdbr,

Case

When f34_1018 = F47_1429 And F40_1018 = 2 Then ‘1‘ Else  ‘2‘  End As Fdbrxz,

Case

When f34_1018 = F47_1429 And F40_1018 = ‘2‘ And

F41_1018 = 49 Then  ‘105‘

When f34_1018 = F47_1429 And F40_1018 <> ‘2‘ And

F41_1018 = 49 Then  ‘205‘

When f34_1018 = F47_1429 And F40_1018 = ‘2‘ And

F41_1018 <> 49 Then  ‘1‘

When f34_1018 = F47_1429 And F40_1018 <> ‘2‘ And

F41_1018 <> 49 Then ‘2‘

When f34_1018 = F47_1429 And F41_1018 = ‘25‘ Then ‘3‘

When f40_1429=‘2000850‘ Then ‘2‘

Else  ‘4‘  End As Ffxrlb,

Case

When Exists (Select 1

From wind.tb_object_1269

Where f1_1269 = f25_4516

And f85_1269 Is Null) Then  1

Else  0 End As fsfsh,

Case

When f34_1018 = F47_1429 And F41_1018 = ‘11‘ Then  ‘1‘

When f34_1018 = F47_1429 And F41_1018 = ‘29‘ Then ‘2‘

When f34_1018 = F47_1429 And F41_1018 = ‘4‘ Then ‘3‘

When f34_1018 = F47_1429 And F41_1018 = ‘27‘ Then ‘4‘

When f34_1018 = F47_1429 And ob_object_name_1018 = ‘中国人民银行‘ Then ‘5‘

When f34_1018 = F47_1429 And F41_1018 = ‘25‘ Then ‘6‘

When f34_1018 = F47_1429 And F41_1018 = ‘3‘ Then ‘7‘

Else ‘8‘ End As fdbrzt,

(Select f7_1271

From wind.tb_object_1271

Where f1_1271 = f43_4516) fzgjzr,

nvl((SELECT f3_1735

FROM wind.tb_object_1735 a

Where F1_1735 = F43_4516

And F2_1735 = ‘长期信用评级‘

And f4_1735 = (SELECT Max(f4_1735)

FROM wind.tb_object_1735 b

Where a.f1_1735 = b.f1_1735

And b.f2_1735 = ‘长期信用评级‘)

And rownum = 1),‘NULL‘) cqxypj,

NVL((SELECT f3_1735

FROM wind.tb_object_1735 c

Where F1_1735 = F43_4516

And F2_1735 = ‘短期信用评级‘

And f4_1735 = (SELECT Max(f4_1735)

FROM wind.tb_object_1735 d

Where F43_4516 = d.f1_1735

And F2_1735 = ‘短期信用评级‘)

And rownum = 1),‘NVLL‘) dqxypj,

NVL((SELECT f4_1454

FROM wind.tb_object_1454 c

Where F1_1454 = F25_4516

And F54_1454 = ‘408001000‘

And f2_1454 = (SELECT Max(f2_1454)

FROM wind.tb_object_1454 d

Where F25_4516 = d.f1_1454

And F54_1454 = ‘408001000‘)),0) hxzbczl,

NVL((SELECT f145_1853

FROM wind.tb_object_1853 c

Where F1_1853 = F25_4516

And F4_1853 = ‘合并报表‘

And f2_1853 = (SELECT Max(f2_1853)

FROM wind.tb_object_1853 d

Where F25_4516 = d.f1_1853

And F4_1853 = ‘合并报表‘)),0) zzc,

NVL((SELECT f140_1853

FROM wind.tb_object_1853 c

Where F1_1853 = F25_4516

And F4_1853 = ‘合并报表‘

And f2_1853 = (SELECT Max(f2_1853)

FROM wind.tb_object_1853 d

Where F25_4516 = d.f1_1853

And F4_1853 = ‘合并报表‘)),0) jzc,

NVL((Select f4_1734

From wind.tb_object_1734 a, wind.tb_object_0004

Where ob_object_name_1018 = f1_0004

And f3_0004 = f2_1734

And f5_1734 = (Select Max(f5_1734)

From wind.tb_object_1734 b

Where b.f1_1734 = a.f1_1734)

And rownum = 1),‘NULL‘) DbrXyPj,

Case

When f41_1018 = ‘11‘ Then ‘1‘

When f41_1018 = ‘29‘ Then ‘2‘

When f41_1018 In (‘4‘, ‘5‘) Then ‘3‘

When f41_1018 = ‘49‘ And OB_OBJECT_NAME_1018 = ‘中国人民银行‘ Then ‘5‘

When f41_1018 = ‘17‘ Then ‘6‘

Else  ‘7‘ End As rzzt,

nvl((SELECT f4_1734

FROM wind.tb_object_1734 c

Where F2_1734 = F25_4516

And F3_1734 = ‘长期信用评级‘

And f5_1734 = (SELECT Max(f5_1734)

FROM wind.tb_object_1734 d

Where c.f1_1734 = d.f1_1734

And d.F3_1734 = ‘长期信用评级‘)

And rownum = 1),‘NULL‘) FCqXypj,

NVL((SELECT f4_1734

FROM wind.tb_object_1734 c

Where F2_1734 = F25_4516

And F3_1734 = ‘短期信用评级‘

And f5_1734 = (SELECT Max(f5_1734)

FROM wind.tb_object_1734 d

Where c.f1_1734 = d.f1_1734

And d.F3_1734 = ‘短期信用评级‘)

And rownum = 1),‘NULL‘) FDqXypj,

‘NULL‘ FGjxypj,

NVL((Select f6_1734

FROM wind.tb_object_1734 c

Where F2_1734 = F25_4516

And f5_1734 = (Select Max(f5_1734)

From wind.tb_object_1734 d

Where c.f1_1734= d.f1_1734)

And rownum = 1),‘NULL‘) FGnxypjJgd,

‘NULL‘ FGjxypjJgd,

nvl((SELECT f4_1734

FROM wind.tb_object_1734 c

Where F2_1734 = F25_4516

And F3_1734 = ‘长期信用评级‘

And f5_1734 = (SELECT Max(f5_1734)

FROM wind.tb_object_1734 d

Where c.f1_1734 = d.f1_1734

And d.F3_1734 = ‘长期信用评级‘)

And rownum = 1

),‘NULL‘) DCqXypj,

(SELECT Case

When F4_1641 = ‘1年期定期存款利率‘ Then  2082

When F4_1641 = ‘半年期定期存款利率‘ Then   2061

When F4_1641 = ‘三个月定期存款利率‘ Then  2070

When F4_1641 = ‘7天回购定盘平均值‘ Then  4016

When F4_1641 = ‘7天回购利率平均值‘ And f6_1641 = ‘B2W‘ Then 4003

When F4_1641 = ‘7天回购利率平均值‘ And f6_1641 = ‘B_2W‘ Then 4002

When F4_1641 = ‘7天回购利率平均值‘ And f6_1641 = ‘B_1M‘ Then 3976

When F4_1641 = ‘LIBOR‘ And f6_1641 = ‘LIBOR_6M-USD‘ Then 5041

When F4_1641 = ‘SHIBOR‘ And f6_1641 = ‘SHIBOR_3M(10)‘ Then 7480

When F4_1641 = ‘SHIBOR‘ And f6_1641 = ‘SHIBOR_3M(5)‘ Then  7606

When F4_1641 = ‘SHIBOR‘ And

f6_1641 = ‘SHIBOR_1W(120)‘ Then 7942

When F4_1641 = ‘SHIBOR‘ And f6_1641 = ‘SHIBOR_1Y(10)‘ Then 9595

When F4_1641 = ‘SHIBOR‘ And f6_1641 = ‘SHIBOR_1Y(20)‘ Then 13216

End x FROM wind.tb_object_1641  Where f1_1641 = f43_4516) flvjzlb,

NVL((SELECT f140_1853

FROM wind.tb_object_1853

Where F1_1853 = F47_1429

And F4_1853 = ‘合并报表‘

And f2_1853 = (SELECT Max(f2_1853)

FROM wind.tb_object_1853

Where F1_1853 = F47_1429

And F4_1853 = ‘合并报表‘)),0) FdbrSnmJzc,

NVL((SELECT f4_1734

FROM wind.tb_object_1734 c

Where F2_1734 = F25_4516

And F3_1734 = ‘长期信用评级‘

And f5_1734 = (SELECT Max(f5_1734)

FROM wind.tb_object_1734 d

Where  c.f1_1734 = d.f1_1734

And c.F3_1734 = ‘长期信用评级‘)

And rownum = 1),‘NULL‘) fsndgncqxy,

NVL((Select f6_1734

FROM wind.tb_object_1734 c

Where F2_1734 = F25_4516

And F3_1734 = ‘长期信用评级‘

And f5_1734 = (Select Max(f5_1734)

From wind.tb_object_1734 d

Where  c.f1_1734 = d.f1_1734

And F3_1734 = ‘长期信用评级‘)

And rownum = 1),‘NULL‘) Fdbrgnpjjg,

(Select Max(f3_5015) From wind.tb_object_5015  Where  f2_5015 =f43_4516 And f12_5015 Is Not Null And f13_5015 Is Not Null ) fzgr

From wind.tb_object_4516

Left Join wind.tb_object_1639 On F1_1639 = F43_4516

And f2_1639 =

to_char(&PlanTime - 1, ‘YYYYMMDD‘)

Left Join wind.tb_object_1429 On F1_1429 = F43_4516 And (F30_1429>=to_char(&PlanTime,‘yyyymmdd‘) Or F30_1429 Is Null)

Inner Join wind.tb_object_1090 On f1_1429 = f2_1090

Left Join wind.tb_object_1018 On F25_4516 = F34_1018) a

--取报表情况和盈利情况

Left Join (Select a.f1_5034, decode(ylqk, 1, 0, ylqk) ylqk, bbqk

From (Select f1_5034, nvl(Min(rn) - 1, Sum) ylqk

From (Select f1_5034,f3_5034,f25_5034,row_number() Over(partition By f1_5034 Order By f3_5034 Desc) rn,

Sum(1) Over(partition By f1_5034) Sum

From wind.tb_object_5034 Where f3_5034 Like ‘%1231‘) t

Where nvl(f25_5034, 0) <= 0

Group By f1_5034, Sum) a,

(Select f1_5034, nvl(Min(rn) - 1, Sum) bbqk

From (Select f1_5034, f3_5034, f25_5034,row_number() Over(partition By f1_5034 Order By f3_5034 Desc) rn,

Sum(1) Over(partition By f1_5034) Sum

From wind.tb_object_5034 Where f3_5034 Like ‘%1231‘) t

Where f25_5034 Is Null

Group By f1_5034, Sum) b

Where a.f1_5034 = b.f1_5034) tt On a.ffxgsdm = tt.f1_5034

--fggxx字段

Inner Join (Select Distinct f1_4516, f2_4516,

Case When F37_1673 Is Null And Not Exists

(Select 1

From wind.tb_object_1673 b

Where f37_1673 Is Not Null

And b.f1_1673 = a.f1_1673) Then  1 Else  0 End As fggxx

From wind.tb_object_4516

Left Join wind.tb_object_1673 a On f1_1673 = f25_4516) xx On a.zqdm =

xx.f1_4516

And a.zqmc =

xx.f2_4516

-- 取转股比例和转股价格字段                                                                         

Left Join wind.tb_object_5015 x On  a.f43_4516 =x.f2_5015  And x.f3_5015=a.fzgr

--取企业(公司)债券发行人待偿还的企业债券余额

Left Join (Select f40_1429 ,Sum(f3_1640*10000) Ffxrdchqyz  From wind.tb_object_1429,wind.tb_object_1640 Where (F30_1429> to_char(&PlanTime-1,‘yyyymmdd‘) Or F30_1429 Is Null)

And F1_1640=F1_1429

Group By f40_1429) yy On a.f40_1429=yy.f40_1429

)

时间: 2024-10-25 22:20:49

优化笔记:jsyhjkzqxx_D_20140916.gz的相关文章

优化笔记: jxrsfxrxx_D_20140916.gz

性能瓶颈在1734表的重复扫描.   ----------------------------------想进一步研究,继续往下看------------------------------ 1.       所有相似子查询合并成一个(不仅仅是相同,如WBPJRQ,DBPJ,WBPJ字段),合并方法见下面代码. 2.       如果仅是为了验证存在的话,可以把join改为exist或者in.比如第一段脚本的1018表和1090表相连. 在oracle和sqlserver中,join有3中算法,

千万级记录的Discuz论坛导致MySQL CPU 100%的优化笔记

千万级记录的Discuz论坛导致MySQL CPU 100%的优化笔记 2007年3月,我写过一篇文章<解决一个 MySQL 服务器进程 CPU 占用 100%的技术笔记>( http://www.xiaohui.com/weekly/20070307.htm ),谈到自己在解决一个拥有 60 万条记录的 MySQL 数据库访问时,导致 MySQL CPU 占用 100% 的经过.在解决问题完成优化(optimize)之后,我发现 Discuz 论坛也存在这个问题,当时稍微提了一下: 发现此主

java性能优化笔记(三)java程序优化

程序代码优化要点: 字符串优化:分析String源码,了解String常用方法,使用StringBuffer.StringBuilder. List.Map.Set优化:分析常用ArrayList.LinkedList.HashMap.TreeMap.LinkedHashMap.Set接口.集合常用方法优化. 使用NIO:Buffered.Channel操作和原理,使用零拷贝. 引用优化:强引用.弱引用.软引用.虚引用.WeekHashMap. 优化技巧:常用代码优化技巧.这里不一一罗列,请参考

SQL优化笔记—CPU优化

补充:常规服务器动态管理对象包括,下面有些资料可能会应用到 dm_db_*:数据库和数据库对象dm_exec_*:执行用户代码和关联的连接dm_os_*:内存.锁定和时间安排dm_tran_*:事务和隔离dm_io_*:网络和磁盘的输入/输出 优化性能的常用方法是检索速度最慢的查询构成您 SQL Server 实例上的正常. 每日工作负载的一部分,然后调整它们,一个接一个的"Top 10"列表. 跟踪会话. 请求 和 SQL Server 基础架构中的最耗费大量资源,查询和执行时间最长

CMU Convex Optimization(凸优化)笔记1--凸集和凸函数

CMU凸优化笔记--凸集和凸函数 结束了一段时间的学习任务,于是打算做个总结.主要内容都是基于CMU的Ryan Tibshirani开设的Convex Optimization课程做的笔记.这里只摘了部分内容做了笔记,很感谢Ryan Tibshirani在官网中所作的课程内容开源.也很感谢韩龙飞在CMU凸优化课程中的中文笔记,我在其基础上做了大量的内容参考.才疏学浅,忘不吝赐教. 1.凸集合 1.1 基本概念 定义:给定一个集合$C \subseteq \mathbb{R}^n $,满足下列条件

U3D开发性能优化笔记(待增加版本)

U3D开发性能优化笔记: .NGUI: Atlas优化; .poolmanager使用; .控制同屏drawcall次数; .SHADER优化顶点和运算; .合批与动态剔除; .逻辑部分优化;(如看到不到的物件不要做公告板位置运算,不要播放animation) .物理帧UPDATE降低; .关闭垂直同步,降低图片采样,声音预加载 方案 等等 ..; .模型骨骼不要超过32根; .贴图不要太大,建议512 *512 以下; .少用 CUTOFF和 aplha混合; .3D游戏效率基本原则就是费内存

Android App性能优化笔记之一:性能优化是什么及为什么?

By Long Luo 周星驰的电影<功夫>里面借火云邪神之口说出了一句至理名言:“天下武功,唯快不破”. 在移动互联网时代,同样如此,留给一个公司的窗口往往只有很短的时间,如何把握住这个时机,迅速开发出产品,成为至关重要的一环.相对传统互联网时代的PC产品,用户对移动端产品的容忍度更低.而一款移动应用在推出的时候可能只是接近完成的状态,这就需要通过快速的迭代开发来更新产品,不断完善产品来留住用户.同时,通过更新产品也能唤醒一些沉默用户,让一些原本下载了应用但使用次数非常少的用户给该应用多一次

网站基于ElasticSearch搜索的优化笔记 PHP

基本情况就是,媒体.试题.分类,媒体可能有多个试题,一个试题可能有多个分类,分类为三级分类加上一个综合属性.通过试题名称.分类等搜索查询媒体. 现在的问题为,搜索结果不精确,部分搜索无结果,ES的数据结构不满足搜索需求.解决方案就是,重构ES数据结构,采用父子关系的方式,建立media和question两个type. 全程使用https://github.com/mobz/elasticsearch-head,这个进行ES的管理和查看,很方便. 从ES的说明可以看出,ES是面向文档,其实所有的数

移动web性能优化笔记

移动web性能优化 最近看了一些文章,对移动web性能优化方法,做一个简单笔记 笔记内容主要出自 移动H5前端性能优化指南和移动前端系列——移动页面性能优化