A detailed Guide on sql query Optimization This article was published as a part of the
Download 243.81 Kb. Pdf ko'rish
|
a-detailed-guide-on-sql-query-optimization
- Bu sahifa navigatsiya:
- Introduction to SQL
- DML(Data Manipulation Language)
A Detailed Guide on SQL Query Optimization This article was published as a part of the Data Science Blogathon Overview of SQL Query Optimization SQL Query optimization is defined as the iterative process of enhancing the performance of a query in terms of execution time, the number of disk accesses, and many more cost measuring criteria. Data is an integral part of any application. Access to the data should be in the fastest way possible to enhance the user experience while using the application. It is a very critical task. Even slight changes in SQL queries can improve performance drastically. There is no step-by-step guide for the same. In turn, we must use general guidelines for writing queries, which operators to use. Then check for execution plans and find out hat part of the query takes the most time and rewriting that part in some other way. In this tutorial we will learn the following topics: SQL Query optimization Introduction to SQL Query processing Purpose of SQL Query optimization Database for the tutorial Metrics for analyzing SQL query performance Optimization techniques Indexing Selection Avoid using SELECT DISTINCT Inner joins versus WHERE clause LIMIT command IN versus Exists Loops versus Bulk INSERT/UPDATE Conclusion Introduction to SQL SQL(Structured Query Language) is a standard language for accessing, storing, creating, deleting databases, and perform all other data-related operations. There are four types of language in SQL: 1. DDL(Data Definition Language) BE G I NNE R D ATA E NG I NE E RI NG SQL This includes commands for creating and altering the schema of the database. Example: CREATE, DROP, ALTER, TRUNCATE. 2. DML(Data Manipulation Language) This includes commands for updating the data in the database. It alters the instance of the relation. For example, SELECT, UPDATE, INSERT, DELETE. 3. DCL(Data Control Language) This includes commands for access to the database. For example, GRANT, REVOKE. 4. TCL(Transaction Control Language) This includes the commands used to manage transactions in the database. For example, COMMIT, ROLLBACK. Image Source: Google images Before going towards the main topic of SQL Query optimization, let us first understand the actual processing of query: Download 243.81 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling