系統識別號 | U0002-2606201823420200 |
---|---|
DOI | 10.6846/TKU.2018.00833 |
論文名稱(中文) | SQL效能之改善研究-以Oracle資料庫為例 |
論文名稱(英文) | Study on the Improvement of SQL Performance - Taking Oracle Database as an Example |
第三語言論文名稱 | |
校院名稱 | 淡江大學 |
系所名稱(中文) | 資訊管理學系碩士在職專班 |
系所名稱(英文) | On-the-Job Graduate Program in Advanced Information Management |
外國學位學校名稱 | |
外國學位學院名稱 | |
外國學位研究所名稱 | |
學年度 | 106 |
學期 | 2 |
出版年 | 107 |
研究生(中文) | 朱瑞廷 |
研究生(英文) | Jui-Ting Chu |
學號 | 705630134 |
學位類別 | 碩士 |
語言別 | 繁體中文 |
第二語言別 | |
口試日期 | 2018-06-02 |
論文頁數 | 58頁 |
口試委員 |
指導教授
-
黃明達
委員 - 黃明達 委員 - 游佳萍 委員 - 黃莉君 |
關鍵字(中) |
SQL 效能調校 索引 |
關鍵字(英) |
SQL Performance Tuning Index |
第三語言關鍵字 | |
學科別分類 | |
中文摘要 |
資料庫系統上線初期,通常不會有效能上的問題,但是當系統運行了一陣子後,可能因為資料量增加或等其他因素,造成SQL的效能下降,進而造成公司業務執行遲緩或無法運作的問題。 因此,如何藉由改善SQL效能,以提高資料庫服務水準,便成了值得探討的問題。本研究以台灣知名企業(A公司、P公司)之Oracle資料庫系統為研究對象,進行多個個案分析研究,研究期間為2017年7月至2017年12月。 本研究案例於實際正式環境進行測試,並進行比較其SQL執行時間,調校後的SQL執行時間大幅度減少,調校效果顯著。 本論文的貢獻在於透過效能調校步驟,進行SQL效能調校,並彙整SQL效能不佳的原因及建議。期望藉由實際案例,提供給系統設計者及資料庫管理者當為未來設計、開發程式及維護資料庫的案例參考。 |
英文摘要 |
In the management and maintenance of the database system, the performance issue has always been the focus of attention of everyone. When the system is initially launched, it is usually not a problem of effective performance. However, when the system is running for a while, it may be due to the increase in the amount of data or Other factors, such as the decline in the effectiveness of SQL, and the resulting slow or inoperable business operations of the company. Therefore, how to improve the database service level by improving the efficiency of SQL has become a question worth exploring. This study takes the Oracle database system of a well-known Taiwanese company (A company, P company) as the research object, and the research period is from July 2017 to December 2017. The study case was tested in the actual formal environment, and the SQL execution time was compared. After the adjustment, the execution time of SQL was greatly reduced, and the adjustment effect was quite obvious. The contribution of this dissertation is to use performance tuning steps to perform SQL performance tuning and to gather the reasons and suggestions for poor SQL performance. Expectations are provided to system designers and database managers as case references for designing, developing programs, and maintaining databases in the future. |
第三語言摘要 | |
論文目次 |
目 次 目 次 IV 表目錄 V 圖目錄 VI 第一章 緒論 1 第一節 研究背景與動機 1 第二節 研究目的 2 第三節 論文架構 3 第二章 文獻探討 4 第一節 SQL 效能調校步驟 5 第二節 SQL 效能調校方式 9 第三節 資料庫效能調校指標 18 第三章 研究設計 20 第一節 研究對象 20 第二節 研究方法21 第三節 研究範圍 21 第四章 個案研究與分析 22 第一節 個案描述 22 第二節 SQL 效能調校案例24 第三節 個案整理 52 第五章 結論與建議 53 第一節 結論 53 第二節 建議 54 參考文獻 56 表目錄 表 4 1 A公司資料庫主機硬體配備 22 表 4 2 P公司資料庫主機硬體配備 23 表 4 3 SQL1調校前效能統計資料 25 表 4 4 SQL1調校後效能統計資料 28 表 4 5 SQL2原始效能統計資料 31 表 4 6 SQL2調校後效能統計資料 34 表 4 7 SQL3原始效能統計資料 36 表 4 8 SQL3調校後效能統計資料 38 表 4 9 SQL4原始效能統計資料 42 表 4 10 SQL4調校後效能統計資料 46 表 4 11 SQL5調校前效能統計資料 48 表 4 12 SQL5調校後效能統計資料 51 表 4 13 案例問題及優化方式彙總表 52 圖目錄 圖 2-1 SQL 效能調校步驟流程圖 8 圖 2-2 成本優化器架構圖 11 圖 2-3 SQL 執行計劃(SQL Explain plan)12 圖 2-4 執行計劃樹型圖 12 圖 2-5 全表掃描示意圖 14 圖 2-6 ROWID 格式組成 15 圖 2-7 索引示意圖 16 圖 2-8 巢狀迴圈連結架構圖 16 圖 2-9 雜湊連結架構圖 17 圖 2-10 排序合併連結架構圖 18 圖 4-1 Top Working SQL 24 圖 4-2 SQL1 原始執行計劃 26 圖 4-3 SQL1 原始執行計劃樹形圖 26 圖 4-4 SQL1 調校後執行計劃 27 圖 4-5 SQL2 AWR 報表30 圖 4-6 SQL2 調校前的執行計劃 32 圖 4-7 SQL2 調校後的執行計劃33 圖 4-8 SQL3 優化前執行時間統計圖35 圖 4-9 SQL3 調校前執行計劃 37 圖 4-10 SQL3 調校後執行計劃 39 圖 4-11 SQL4 優化前AWR 報表41 圖 4-12 SQL4 原始執行計劃 43 圖 4-13 SQL4 調校後執行計劃45 圖 4-14 SQL5 AWR 報表- SQL Order by Elapsed Time 47 圖 4-15 SQL5 調校前的執行計劃49 圖 4-16 SQL5 調校後的執行計劃50 |
參考文獻 |
一、中文文獻 1.李韋豛,2006,空間資料庫有效索引改善方式及應用,交通大學電機資訊學院碩士論文。 2.林姿君,2013,TOP SQL系統效能管理介面改善研究,東吳大學資訊管理學系碩士論文。 3.周家豐,2012,利用MMS工具調校MySQL資料庫效能,中興大學資訊科學與工程學系碩士論文。 4.洪家翔,2013,基於快取B+樹機制改善加密資料庫查詢效能之研究,元智大學資訊工程學系碩士論文。 5.郭敏、郭靖,2005,Oracle 10G 數據庫性能優化的研究,武漢理工大學學報。 6.高國峰、廖宜恩、楊旺,2007,使用統計資訊的資料庫索引調校方法效能之研究,修平學報。 7.張天慧,2008,Oracle 資料庫管理與維護,悅知文化。 8.巢子杰,2010,Oracle數據庫優化探究,南京曉莊學院軟件導刊。 9.蓋國強、楊廷琨、態軍、段林仲、鄒德平,2010,Oracle DBA 手記,碁峰資訊。 10.蔡宏修,2010,以系統模擬探討資料庫綱要對資料庫系統效能的影響,中華大學資訊管理學系碩士論文。 11.賴政賢,2012,資料庫效能監控系統的設計與實作,中華大學資訊管理學系碩士論文。 12.譚懷遠,2011,Oracle 10g/11g效能分析與最佳化,博碩文化。 二、英文文獻 13.Ashdown, L., Baer, H., Chatterjee, D., Jernigan, K., Lee, S. K., McDermid, D., & Shaft, U. (2013). "Oracle Database SQL Tuning Guide." Oracle. 14.Burleson, D. K. (2002). "Oracle High - Performance SQL tuning." McGraw-Hill. 15.Charalambides, S., & Bobak, M. (2013). "Oracle SQL Tuning with Oracle SQLTXPLAIN." Apress. 16.Cooper, B. F., Sample, N., Franklin, M. J., Hjaltason, G. R., & Shadmon, M. (2001). "A fast index for semistructured data. " VLDB. 17.Dageville, Benoit, & Karl Dias. (2006). "Oracle's Self-Tuning Architecture and Solutions." IEEE Data Engineering Bulletin. 18.Oracle, 2017, Database SQL Tuning Guide, Accessed: 2018/01/03, URL: https://docs.oracle.com/database/121/TGSQL/toc.htm. 19.Shasha, D., & Bonnet, P. (2002). "Database tuning: principles, experiments, and troubleshooting techniques. " Morgan Kaufmann. 20.Tow, D. (2003). "SQL Tuning: Generating Optimal Execution Plans." O'Reilly. 21.Wikipedia, 2017, SQL, Accessed: 2018/01/03, URL: https://en.wikipedia.org/wiki/SQL. |
論文全文使用權限 |
如有問題,歡迎洽詢!
圖書館數位資訊組 (02)2621-5656 轉 2487 或 來信