锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美+亚洲+精品+三区,国产成人精品福利,精品999视频http://www.aygfsteel.com/davma/articles/247373.htmldavmadavmaFri, 19 Dec 2008 09:26:00 GMThttp://www.aygfsteel.com/davma/articles/247373.htmlhttp://www.aygfsteel.com/davma/comments/247373.htmlhttp://www.aygfsteel.com/davma/articles/247373.html#Feedback0http://www.aygfsteel.com/davma/comments/commentRss/247373.htmlhttp://www.aygfsteel.com/davma/services/trackbacks/247373.html1 鏈変袱涓〃錛孉琛?00澶氫竾錛孊琛?00澶氫竾錛岃繖涓や釜琛ㄨ鍋氬叧鑱旀煡璇紝娌℃湁GROUP BY絳夋搷浣滐紝鍙槸鏅氱殑鏌ヨ錛屽浣曟彁楂橀熷害錛?/span>
[1]鎶婅兘闄愬埗鑼冨洿鏈灝忕殑鏉′歡鏀懼湪鏈鍓嶉潰,姝ゆ潯浠跺搴旂殑鍒楀姞涓涓嬬儲寮?br /> [2]灝介噺鎶奧here鍚庨潰緇欏嚭鐨勬潯浠舵墍瑕佺敤鐨勫瓧孌靛緩绔嬬儲寮?
閬垮厤浣跨敤like, 閬垮厤鍦╳here涓嬌鐢╥s null鎴栬卛s not null,
鍙﹀,鍏堣闄愬埗浠庝袱寮犺〃鍙栫殑鏁版嵁,鏈鍚庢墠鍐欎袱琛ㄥ叧鑱旂殑瀛楁(涓よ〃榪炴帴鐨勬潯浠?
[3]绱㈠紩鏄彁鍗囬熷害鐨勫叧閿傚彲浠ヨ冭檻鍒嗘垚鍑犱釜鏌ヨ錛屾瘡涓煡璇㈠搴斾竴涓渶浣崇殑绱㈠紩
[4]寮哄埗绱㈠紩錛涘皯鐢↖N錛岀敤EXISTS錛涘彲浠ョ殑璇濓紝澶氬緩涓存椂琛紱
[5]鎶鏈笂鎻愰珮鏌ヨ鍔炴硶錛氬緩绔嬪悎閫傜殑绱㈠紩錛岄伩鍏嶇敤褰卞搷鏌ヨ閫熷害鐨勬潯浠?姣斿in銆?絳夛紝濡傛灉鍙互浣減artition鐨勶紝灝變綔partition錛屽敖閲忓垎孌墊煡璇€?br /> 涓や釜澶ц〃鍏寵仈鏌ヨ錛屽睘浜庝笟鍔¢棶棰橈細鏁版嵁閲忓法澶э紝鏈韓灝辨槸寰堣垂鏃墮棿鐨勪簨銆傚儚縐誨姩銆佺數淇★紝鍩烘湰涓婁笉緇欐墦鍗?騫寸殑甯愬崟錛屽氨鏄伩鍏嶆暟搴﹀お鎱㈠獎鍝嶄笟鍔°?br /> [6]鍏抽敭鐪嬩綘鍋氫粈涔堟牱鐨勫叧鑱旀搷浣滐紝where鏉′歡寰堥噸瑕侊紙鏄惁鐢ㄤ簡in/not in,like絳夋潯浠訛級錛岃繕鏈夋槸鍚︾敤浜唘nion錛堝洜涓簎nion all 鐨勬墽琛岃姣攗nion蹇緢澶氾級
[7]鍏抽敭瀛楀緩绔嬬儲寮?br /> ID閲囩敤LONG鍨嬭屼笉閲囩敤varchar,瀵逛簬嫻烽噺鏁版嵁鐨勬煡璇㈠彲浠ユ彁閫熷緢澶?br /> 鍏跺畠鐨?鏈夊緟妤間笅榪涗竴姝ユ彁渚?br /> [8]琛ㄧ┖闂村垎閰嶅悎鐞?鍥炴粴孌電┖闂村垎閰?50M宸﹀彸
[9]寤虹珛绱㈠紩涔嬪悗 鍒嗘壒鏌ヨ
[10]浼樺寲鏌ヨ鏉′歡,搴旇鏄瘮杈冨疄闄呯殑鍔炴硶,灝嗚繑鍥炵殑緇撴灉緙╁皬鍦ㄦ渶灝忕殑鑼冨洿鍐呯殑鏌ヨ鏀懼埌鍓嶉潰,渚濇
[11]搴斿厛榪涜琛ㄧ┖闂寸殑浼樺寲錛屽洖婊氭鐨勪紭鍖栵紝绱㈠紩浼樺寲錛屽啀榪涜鏌ヨ璇彞鐨勪紭鍖?br /> 濡傛灉榪樻槸涓嶈鍙瘯璇曞緩涓鍥撅紝寤虹珛瑙嗗浘蹇収
2 Transitive predicate generation
濡傛灉鎯蟲煡鍑烘煇涓孌墊椂闂寸殑鏈夋晥鐨勫崟鎹腑錛堟垨鑰呮煇浜涗駭鍝侊級鐨勬槑緇嗚祫鏂欙紝涓鑸殑鍋氭硶錛?br /> select 鎵闇瀛楁
from detail_tab a,main_tab b
where a.prod_id = b.prod_id
and a.yyyymmdd = b.yyyymmdd
and a.paper_no = b.paper_no
and a.io = b.io
and b.yyyymmdd = 鎸囧畾鏃ユ湡
and a.io = 榪涗粨
and b.code = 鏈夋晥鐨?
榪欎釜鏌ヨ鐨勯熷害浼氬洜涓鴻繖涓や釜琛ㄨ繃浜庡法澶ц岄潪甯哥殑緙撴參錛?銆銆銆
鐜板湪鏈変竴涓В鍐沖姙娉曪紝灝辨槸緇欎袱涓〃閮藉姞涓婃潯浠訛紝鍗充嬌鏄袱涓〃鍏寵仈鐨勫瓧孌典篃鍔狅細
select 鎵闇瀛楁
from detail_tab a,main_tab b
where a.prod_id = b.prod_id
and a.yyyymmdd = b.yyyymmdd
and a.paper_no = b.paper_no
and a.io = b.io
and b.yyyymmdd = 鎸囧畾鏃ユ湡
and a.yyyymmdd = 鎸囧畾鏃ユ湡
and a.io = 榪涗粨
and b.io = 榪涗粨
and b.code = 鏈夋晥鐨?

榪欐牱鐨勯熷害瑕佹瘮鍓嶄竴縐嶅揩浜嗚嚦灝?0鍊嶄互涓娿?br /> 浜哄伐璋冧紭錛岀壒鍒浜庣儲寮曪紝鏉′歡欏哄簭銆?br /> 3
http://www.componentace.com/help/absdb_manual/increasesqlperformance.htm
Absolute Database search and filter optimizations are based on the use of available indexes.
 
Always create unique (primary) indexes when possible, as the unique index allow much better optimization then non-unique index.
 
To improve peformance of a LIKE condition, you can create an appropriate index, but note that this index can improve performance for patterns like 'str%' only銆?br />  
Available indexes for JOIN conditions銆俆o improve a JOIN query, please check that each field from JOIN conditions has an index.
 
Rewriting query with OR conditions as a UNION
 
Available indexes for ORDER BY clause If you want to speed up a "live" SELECT from a single table with ORDER BY clause, you can create a compound index for ORDER BY fields.
 
Available indexes for GROUP BY clause銆俆o get a better performance for SELECT from a single table with GROUP BY clause, you can create a compound index for GROUP BY fields.
 
Select from in-memory tables銆俌our query perofrmance could be increased also if you will move all data from disk tables to in-memory tables and you will perform a query using in-memory copies of the disk tables
 
4
The fastest way of inserting and updating
The fastest way of batch inserting / updating / deleting is a buffered transaction.
We recommend to call TABSDatabase.StartTransaction before bulk inserts and
TABSDatabase.Commit(False) after the end of the batch operation. The use of transaction can significantly increase performance of the batch operation
 
How to speed up an UPDATE query
If you are using several subqueries in an UPDATE query, you could try to transform your query like pair values, not separated.
 
5
Common subexpression elimination
 Subquery “flattening”
 Complex/simple view merging
 Predicate pushdown and pullup
OR-expansion 絳夌瓑銆傝繖浜涘弬鑰僪ttp://www.oracle.com/technology/products/bi/db/10g/pdf/twp_general_query_optimization_10gr2_0605.pdf
鎬諱箣鏌ヨ棣栧厛鑰冭檻鏌ヨ鑷韓鐨勪紭鍖栵紝灝嗚褰曟暟灝藉彲鑳藉噺灝戯紝鍗硍here鏉′歡瑕佸敖鍙兘鍏呭垎錛堢壒鍒敞鎰忓彲鎺ㄥ鍜岄噸澶嶇殑鍖哄埆錛夛紝鎶曞獎浼樺厛浜庤仈鎺ワ紝鏃跺埢浠ュ噺灝戣仈鎺ユ暟涓哄垎鏋愮殑涓昏鍘熷垯銆傜劧鍚庢槸瀵圭儲寮曠殑鍒嗘瀽銆傝嚦浜庨噺鍖栧垎鏋愶紝鍒欐槸瀵瑰縐嶇瓥鐣ョ殑璇勪環鐨勭洿鎺ユ柟娉曘?

davma 2008-12-19 17:26 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 张家港市| 蓬溪县| 东源县| 凭祥市| 衢州市| 乌鲁木齐市| 田东县| 名山县| 墨脱县| 贵南县| 屯留县| 南开区| 武清区| 鹿泉市| 大厂| 壤塘县| 奉节县| 郑州市| 余姚市| 宁国市| 兴化市| 尼玛县| 兴国县| 卓资县| 郴州市| 台北县| 湘潭县| 隆林| 松溪县| 湟源县| 锡林郭勒盟| 阆中市| 丰宁| 清苑县| 泗水县| 乐昌市| 揭东县| 海丰县| 遂川县| 政和县| 宁安市|