Special offers now — see discounted courses.
day
:
hour
:
min
:
sec
See special offers
Advanced SQL for Query Tuning and Performance Optimization

Advanced SQL for Query Tuning and Performance Optimization

2h 10mAdvanced2023-10-11

Authors

Dan Sullivan

Dan Sullivan

Enterprise Architect, Big Data Expert

Course details

SQL queries can be fast and highly efficient, but they can also be slow and demand excessive CPU and memory resources. For many SQL programmers, occasional bouts with long-running queries and poor performance are simply par for the course. But by gaining a better understanding of how databases translate SQL queries into execution plans, you can take steps to avoid these issues. In this course, Dan Sullivan shows you how to analyze query execution plans and use data modeling strategies to boost query performance. Dan describes how SQL queries are executed, highlights different types of indexes and how they factor in query tuning, covers several methods for performing joins, and discusses how to use partitioning and materialized views to improve performance. Plus, Dan shows you how to run PostgreSQL in GitHub Codespaces so you can get started learning faster.

Skills covered

SQLDatabase AdministrationAdvancedDatabase DevelopmentDatabase ManagementData AnalysisProgramming LanguagesData ScienceBusiness Analysis and StrategyBusiness Software and ToolsOpen SourceSoftware Development

Concepts

0. Introduction

  • 01 - Reduce query response time with query tuning
  • 02 - What you should know

1. How SQL Executes a Query

  • 03 - From declarative SQL to a procedural execution plan
  • 04 - Scanning tables and indexes
  • 05 - Joining tables
  • 06 - Partitioning data
  • 07 - Challenge - Choosing how to partition a table
  • 08 - Solution - Choosing how to partition a table

2. PostgreSQL Tools for Tuning

  • 09 - Using PostgreSQL in Codespaces
  • 10 - Explain and analyze
  • 11 - Example plan - Selecting with a WHERE clause
  • 12 - Indexes
  • 13 - Challenge - Generating a query execution plan
  • 14 - Solution - Generating a query execution plan

3. Types of Indexes

  • 15 - Indexing
  • 16 - B-tree indexes
  • 17 - B-tree index example plan
  • 18 - Bitmap indexes
  • 19 - Bitmap index example plan
  • 20 - Hash indexes
  • 21 - Hash index example plan
  • 22 - Bloom filter indexes
  • 23 - PostgreSQL-specific indexes
  • 24 - Challenge - Choosing an index
  • 25 - Solution - Choosing an index

4. Tuning Joins

  • 26 - Types of joins
  • 27 - Nested loops
  • 28 - Nested loop example plan
  • 29 - Hash joins
  • 30 - Hash join example plan
  • 31 - Merge joins
  • 32 - Merge join example
  • 33 - Subqueries vs. joins
  • 34 - Challenge - Designing a join
  • 35 - Solution - Designing a join

5. Partitioning Data

  • 36 - Horizontal vs. vertical partitioning
  • 37 - Partition by range
  • 38 - Partition by range example
  • 39 - Partition by list
  • 40 - Partition by list example
  • 41 - Partition by hash
  • 42 - Partition by hash example
  • 43 - Challenge - Partitioning a table
  • 44 - Solution - Partitioning a table

6. Materialized Views

  • 45 - Materialized views
  • 46 - Creating materialized views
  • 47 - Refreshing materialized views
  • 48 - Challenge - Creating a materialized view
  • 49 - Solution - Creating a materialized view

7. Database Statistics and Identifying Slow Queries

  • 50 - Collect statistics about data in tables
  • 51 - Analyzing execution statistics with pg stat statements
  • 52 - Reviewing execution plans with the auto explain module
  • 53 - Additional analysis with other pg stats data
  • 54 - Challenge - Analyze schema statistics
  • 55 - Solution - Analyze schema statistics

8. Other Optimization Techniques

  • 56 - Using common table expressions to avoid repetitive computation
  • 57 - Hints to the Query Optimizer
  • 58 - Parallel query execution
  • 59 - Improving cache utilization
  • 60 - Miscellaneous tips
  • 61 - Challenge - Design a common table expression
  • 62 - Solution - Design a common table expression

Conclusion

  • 63 - Next steps

About us

LyndaKade is a leading learning platform that helps people learn business, software, technology, and creative skills to achieve personal and professional goals.

Phone numberAparat ChannelTelegram SupportTelegram ChannelInstagram Page

All rights to this site belong to LyndaKade.

Terms of Service|Privacy Policy

نماد الکترونیک enamad در صورت اتصال با آی‌پی داخل کشور، نمایش داده خواهد شد.
logo-samandehi - لوگو ساماندهی
Zarinpal
Zibal