SlideShare a Scribd company logo
Query
optimization and
performance
Basic Query Processing
Steps… Query Parsing and Translation(Query compiler)
• check the syntax (e.g. SQL for relational DBMS)
• Verify that the mentioned relations do exist and replace views
• Transform the SQL query to a query plan represented by a relational
algebra expression (for relational DBMS)
 Different possible relational algebra expression for a single query
 Query Optimization(query optimizer)
• Transform the initial query plan into the best possible query plan based
on the given data set
 Specify the execution of single query plan operations(evaluation
primitives)
 E.g. which algo and indices to be used
 The query execution plan is defined by a saquence of evaluation
primitives
 Query evaluation (command processor)
• Execute the query execution plan and return the result

More Related Content

Viewers also liked

Temporal Data
Temporal DataTemporal Data
Temporal Data
Command Prompt., Inc
 
Master theorem
Master theoremMaster theorem
Master theorem
fika sweety
 
Temporal
TemporalTemporal
Temporal
sunsie
 
Mobile database security threats
Mobile database security threatsMobile database security threats
Mobile database security threatsAkhil Kumar
 
Mobile Database ,alrazgi
Mobile Database ,alrazgiMobile Database ,alrazgi
Mobile Database ,alrazgi
alrazgi
 
Mobile dbms
Mobile dbmsMobile dbms
Mobile dbmsTech_MX
 

Viewers also liked (7)

Temporal Data
Temporal DataTemporal Data
Temporal Data
 
Master theorem
Master theoremMaster theorem
Master theorem
 
Temporal
TemporalTemporal
Temporal
 
Mobile database security threats
Mobile database security threatsMobile database security threats
Mobile database security threats
 
Mobile Database ,alrazgi
Mobile Database ,alrazgiMobile Database ,alrazgi
Mobile Database ,alrazgi
 
Temporal database
Temporal databaseTemporal database
Temporal database
 
Mobile dbms
Mobile dbmsMobile dbms
Mobile dbms
 

Similar to Query optimization and performance

Query processing
Query processingQuery processing
Query processing
Ravinder Kamboj
 
LECTURE_06_DATABASE PROCESSING & OPTIMAZATION.pptx
LECTURE_06_DATABASE PROCESSING & OPTIMAZATION.pptxLECTURE_06_DATABASE PROCESSING & OPTIMAZATION.pptx
LECTURE_06_DATABASE PROCESSING & OPTIMAZATION.pptx
AthosBeatus
 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)
Ravinder Kamboj
 
Ch-2-Query-Process.pptx advanced database
Ch-2-Query-Process.pptx advanced databaseCh-2-Query-Process.pptx advanced database
Ch-2-Query-Process.pptx advanced database
tasheebedane
 
700442110-advanced database Ch-2-Query-Process.pptx
700442110-advanced database Ch-2-Query-Process.pptx700442110-advanced database Ch-2-Query-Process.pptx
700442110-advanced database Ch-2-Query-Process.pptx
tasheebedane
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
meharikiros2
 
Query optimization
Query optimizationQuery optimization
Query optimization
Zunera Bukhari
 
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cPresentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Ronald Francisco Vargas Quesada
 
Top-k Exploration of Query Candidates for Efficient Keyword Search on Graph-S...
Top-k Exploration of Query Candidates for Efficient Keyword Search on Graph-S...Top-k Exploration of Query Candidates for Efficient Keyword Search on Graph-S...
Top-k Exploration of Query Candidates for Efficient Keyword Search on Graph-S...
Thanh Tran
 
Lecture 5.pptx
Lecture 5.pptxLecture 5.pptx
Lecture 5.pptx
Shafii8
 
Query Decomposition and data localization
Query Decomposition and data localization Query Decomposition and data localization
Query Decomposition and data localization
Hafiz faiz
 
11g nf sql_anlz
11g nf sql_anlz11g nf sql_anlz
11g nf sql_anlz
Kyung Sang Jang
 
Querying_with_T-SQL_-_01.pptx
Querying_with_T-SQL_-_01.pptxQuerying_with_T-SQL_-_01.pptx
Querying_with_T-SQL_-_01.pptx
QuyVo27
 
Query processing-and-optimization
Query processing-and-optimizationQuery processing-and-optimization
Query processing-and-optimization
WBUTTUTORIALS
 
SQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query PerformanceSQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query Performance
Vinod Kumar
 
Transformation-based Refactorings: a First Analysis
Transformation-based Refactorings: a First AnalysisTransformation-based Refactorings: a First Analysis
Transformation-based Refactorings: a First Analysis
ESUG
 
Overview of query evaluation
Overview of query evaluationOverview of query evaluation
Overview of query evaluationavniS
 

Similar to Query optimization and performance (20)

Query processing
Query processingQuery processing
Query processing
 
LECTURE_06_DATABASE PROCESSING & OPTIMAZATION.pptx
LECTURE_06_DATABASE PROCESSING & OPTIMAZATION.pptxLECTURE_06_DATABASE PROCESSING & OPTIMAZATION.pptx
LECTURE_06_DATABASE PROCESSING & OPTIMAZATION.pptx
 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)
 
1 query processing
1 query processing1 query processing
1 query processing
 
1 query processing
1 query processing1 query processing
1 query processing
 
Ch-2-Query-Process.pptx advanced database
Ch-2-Query-Process.pptx advanced databaseCh-2-Query-Process.pptx advanced database
Ch-2-Query-Process.pptx advanced database
 
700442110-advanced database Ch-2-Query-Process.pptx
700442110-advanced database Ch-2-Query-Process.pptx700442110-advanced database Ch-2-Query-Process.pptx
700442110-advanced database Ch-2-Query-Process.pptx
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
 
Query optimization
Query optimizationQuery optimization
Query optimization
 
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cPresentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12c
 
Top-k Exploration of Query Candidates for Efficient Keyword Search on Graph-S...
Top-k Exploration of Query Candidates for Efficient Keyword Search on Graph-S...Top-k Exploration of Query Candidates for Efficient Keyword Search on Graph-S...
Top-k Exploration of Query Candidates for Efficient Keyword Search on Graph-S...
 
Lecture 5.pptx
Lecture 5.pptxLecture 5.pptx
Lecture 5.pptx
 
Query Decomposition and data localization
Query Decomposition and data localization Query Decomposition and data localization
Query Decomposition and data localization
 
11g nf sql_anlz
11g nf sql_anlz11g nf sql_anlz
11g nf sql_anlz
 
Querying_with_T-SQL_-_01.pptx
Querying_with_T-SQL_-_01.pptxQuerying_with_T-SQL_-_01.pptx
Querying_with_T-SQL_-_01.pptx
 
Query processing-and-optimization
Query processing-and-optimizationQuery processing-and-optimization
Query processing-and-optimization
 
Statistics
StatisticsStatistics
Statistics
 
SQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query PerformanceSQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query Performance
 
Transformation-based Refactorings: a First Analysis
Transformation-based Refactorings: a First AnalysisTransformation-based Refactorings: a First Analysis
Transformation-based Refactorings: a First Analysis
 
Overview of query evaluation
Overview of query evaluationOverview of query evaluation
Overview of query evaluation
 

More from fika sweety

Query optimization and performance
Query optimization and performanceQuery optimization and performance
Query optimization and performance
fika sweety
 
Program design techniques
Program design techniquesProgram design techniques
Program design techniques
fika sweety
 
Plsql
PlsqlPlsql
Shift rotate
Shift rotateShift rotate
Shift rotate
fika sweety
 
Graphss
GraphssGraphss
Graphss
fika sweety
 
Modeling and simulation ch 1
Modeling and simulation ch 1Modeling and simulation ch 1
Modeling and simulation ch 1
fika sweety
 
Macros...presentation
Macros...presentationMacros...presentation
Macros...presentation
fika sweety
 
Pseudocode algorithim flowchart
Pseudocode algorithim flowchartPseudocode algorithim flowchart
Pseudocode algorithim flowchart
fika sweety
 
Diversity (HRM)
Diversity (HRM)Diversity (HRM)
Diversity (HRM)
fika sweety
 
Howtowriteamemo 090920105907-phpapp02
Howtowriteamemo 090920105907-phpapp02Howtowriteamemo 090920105907-phpapp02
Howtowriteamemo 090920105907-phpapp02
fika sweety
 
Coal presentationt
Coal presentationtCoal presentationt
Coal presentationt
fika sweety
 
1 Computer Architecture
1 Computer Architecture1 Computer Architecture
1 Computer Architecture
fika sweety
 
3 Pipelining
3 Pipelining3 Pipelining
3 Pipelining
fika sweety
 
19 primkruskal
19 primkruskal19 primkruskal
19 primkruskal
fika sweety
 
Warehouse chapter3
Warehouse chapter3   Warehouse chapter3
Warehouse chapter3
fika sweety
 
Storage memory
Storage memoryStorage memory
Storage memory
fika sweety
 
Quick sort
Quick sortQuick sort
Quick sort
fika sweety
 
L2
L2L2
Activity selection problem
Activity selection problemActivity selection problem
Activity selection problem
fika sweety
 
Project
ProjectProject
Project
fika sweety
 

More from fika sweety (20)

Query optimization and performance
Query optimization and performanceQuery optimization and performance
Query optimization and performance
 
Program design techniques
Program design techniquesProgram design techniques
Program design techniques
 
Plsql
PlsqlPlsql
Plsql
 
Shift rotate
Shift rotateShift rotate
Shift rotate
 
Graphss
GraphssGraphss
Graphss
 
Modeling and simulation ch 1
Modeling and simulation ch 1Modeling and simulation ch 1
Modeling and simulation ch 1
 
Macros...presentation
Macros...presentationMacros...presentation
Macros...presentation
 
Pseudocode algorithim flowchart
Pseudocode algorithim flowchartPseudocode algorithim flowchart
Pseudocode algorithim flowchart
 
Diversity (HRM)
Diversity (HRM)Diversity (HRM)
Diversity (HRM)
 
Howtowriteamemo 090920105907-phpapp02
Howtowriteamemo 090920105907-phpapp02Howtowriteamemo 090920105907-phpapp02
Howtowriteamemo 090920105907-phpapp02
 
Coal presentationt
Coal presentationtCoal presentationt
Coal presentationt
 
1 Computer Architecture
1 Computer Architecture1 Computer Architecture
1 Computer Architecture
 
3 Pipelining
3 Pipelining3 Pipelining
3 Pipelining
 
19 primkruskal
19 primkruskal19 primkruskal
19 primkruskal
 
Warehouse chapter3
Warehouse chapter3   Warehouse chapter3
Warehouse chapter3
 
Storage memory
Storage memoryStorage memory
Storage memory
 
Quick sort
Quick sortQuick sort
Quick sort
 
L2
L2L2
L2
 
Activity selection problem
Activity selection problemActivity selection problem
Activity selection problem
 
Project
ProjectProject
Project
 

Recently uploaded

Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 

Recently uploaded (20)

Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 

Query optimization and performance

  • 2.
  • 3. Basic Query Processing Steps… Query Parsing and Translation(Query compiler) • check the syntax (e.g. SQL for relational DBMS) • Verify that the mentioned relations do exist and replace views • Transform the SQL query to a query plan represented by a relational algebra expression (for relational DBMS)  Different possible relational algebra expression for a single query  Query Optimization(query optimizer) • Transform the initial query plan into the best possible query plan based on the given data set  Specify the execution of single query plan operations(evaluation primitives)  E.g. which algo and indices to be used  The query execution plan is defined by a saquence of evaluation primitives  Query evaluation (command processor) • Execute the query execution plan and return the result