การวิเคราะห์แผนการสืบค้นเพื่อประเมินประสิทธิภาพการทำงานของ อ๊อพติไมเซอร์ที่มีต่อคำสั่งเอสคิวแอลแบบซีเล็กชัน

Main Article Content

ชยาพร แก่นสาร์

บทคัดย่อ

บทคัดย่อ

ภาษาเอสคิวแอล (Structured Query Languages) เป็นองค์ประกอบหนึ่งที่สำคัญในโปรแกรมหรือระบบงานต่างๆ เพราะช่วยเข้าถึงและจัดการข้อมูลภายในฐานข้อมูลได้ ดังนั้นความเร็วหรือประสิทธิภาพการทำงานของแอพพลิเคชันส่วนหนึ่ง จึงเกี่ยวข้องกับรูปแบบคำสั่งภาษาเอสคิวแอลโดยตรง ฉะนั้นในบทความนี้จึงต้องการนำเสนอการวิเคราะห์ และประเมินถึงประสิทธิภาพการทำงานของดีบีเอ็มเอสที่มีต่อคำสั่งเอสคิวแอล โดยใช้แผนการสืบค้น (Query Plan) ซึ่งจะแบ่งการทำงานออกเป็น 4 ขั้นตอนหลักคือ 1) จัดเตรียมเครื่องมือและข้อมูลการทดสอบ โดยจะใช้ออราเคิล เวอร์ชัน 11.1 และ SQL Developer เวอร์ชัน 1.5.5 2) ออกแบบคำสั่งเอสคิวแอล 3) ประมวลผลคำสั่งเอสคิวแอลและสร้างแผนการสืบค้น และ 4) วิเคราะห์และสรุปผลการทำงานตามลำดับ ซึ่งผลการวิเคราะห์และทดสอบการทำงานพบว่ารูปแบบการเข้าถึงข้อมูล วิธีการลิงค์ตาราง การใช้ฟังก์ชันภายในคำสั่ง การใช้ประโยคสืบค้นย่อยแบบวนซ้ำ หรือการใช้ CASE และ UNION นั้นจะส่งผลต่อประสิทธิภาพการเข้าถึงข้อมูลของออราเคิล โดยประโยชน์ที่คาดว่าจะได้รับจากการทดสอบดังกล่าวคือจะช่วยให้นักพัฒนาระบบหรือผู้ใช้ที่สืบค้นข้อมูลด้วยภาษาเอสคิวแอลได้เข้าใจถึงปัจจัยต่างๆ ที่มีผลต่อประสิทธิภาพการทำงานของดีบีเอ็มเอส รวมทั้งสามารถออกแบบและสร้างคำสั่งเอสคิวแอลเพื่อสืบค้นข้อมูลให้ทำงานได้อย่างเหมาะสมทั้งในด้านของเวลาและการใช้งานทรัพยากรในระบบ

คำสำคัญ: การปรับปรุงการทำงานในคำสั่งเอสคิวแอล การปรับปรุงการทำงานของฐานข้อมูลการสร้างแผนการสืบค้น ออราเคิลเวอร์ชัน 11g

Abstract

SQL (Structured Query Language) is an importantelement of software applications because it is adatabase computer declarative language designed for managing data in the Database System. Therefore, SQL influences system performance directly. This article presents an analysis and evaluation of the Oracle database performance by using the query plan. This work has been divided into 4 steps. First, an oracle database environment is set up and a database object is created using Oracle version 11g (Release 1) and SQL Developer version 1.5.5 is used as the main tool for SQL execution. Secondly, an SQL select statement was designed according to the query plan subject in different ways. Thirdly, the SQL command was executed and a query plan was generated. Finally, we discuss and conclude the results. In summary, we found that using a query plan based on access path, join method, and an SQL pattern such as the oracle function, correlated sub query, and the CASE and UNION function will influence system performance. Further, the finding of this article may help developers understand how to perform proper SQL commands in order to improve database performance and minimize resource utilization.

Keywords: SQL Tuning, Database Performance Improvement, Query Plan Generation, Oracle 11g

Article Details

บท
บทความวิชาการ