PostgreSQL Query Optimization Strategies: Study and Interactive Learning Environment
Strategie optimalizace dotazů PostgreSQL: studie a interaktivní výukové prostředí
Authors
Supervisors
Reviewers
Editors
Other contributors
Journal Title
Journal ISSN
Volume Title
Publisher
České vysoké učení technické v Praze
Czech Technical University in Prague
Czech Technical University in Prague
Date of defense
2025-06-11
Abstract
Tato bakalářská práce se zabývá strategiemi optimalizace dotazů v PostgreSQL se zaměřením na techniky indexování a následným vývojem interaktivní webové aplikace pro výuku těchto konceptů. Po rešerší základních optimalizačních principů a ověření několika optimalizačních strategií založených na indexování dat (především použitím indexů typu B-strom) prostřednictvím řízených experimentů na reálných a umělých datových sadách, studie zdůrazňuje zásadní vliv selektivity dotazu, velikosti datové sady a rozložení dat na výkonnost indexů. Stávající výukové nástroje byly přezkoumány s cílem zjistit nedostatky v interaktivitě, zaměření rozsahu a mechanismech zpětné vazby. Analýza těchto nástrojů odhalila nedostatek interaktivity, limitované pokrytí tématu, a nedostatečný mechanismus zpětné vazby pro výuku efektivních SQL dotazů. Na základě těchto poznatků byla vytvořena lokálně spustitelná webová aplikace, obsahující strukturované lekce, praktická cvičení na tvorbu indexů a psaní SQL dotazů, automatické vyhodnocování správnosti a výkonnosti dotazů a generované poznatky na základě exekučních plánů.
This bachelor thesis investigates PostgreSQL query optimization strategies, focusing on indexing techniques, and the subsequent development of an interactive browser-based application to teach these concepts. After analyzing fundamental optimization principles and validating several index-based optimization strategies, primarily centered around B-tree indexes, through controlled experiments on real-world and artificial datasets, the study highlights the crucial impact of query selectivity, dataset size, and data distribution on index performance. Existing educational tools were reviewed to identify gaps in interactivity, scope focus, and feedback mechanisms. The analysis of existing educational tools revealed a lack of interactivity, limited coverage, and insufficient feedback mechanisms for teaching students how to write efficient SQL queries. Based on these insights, a locally runnable browser-based application was created, featuring structured lessons, practical exercises on index creation and writing SQL queries, automated evaluation of query correctness and performance, and insights derived from query execution plans.
This bachelor thesis investigates PostgreSQL query optimization strategies, focusing on indexing techniques, and the subsequent development of an interactive browser-based application to teach these concepts. After analyzing fundamental optimization principles and validating several index-based optimization strategies, primarily centered around B-tree indexes, through controlled experiments on real-world and artificial datasets, the study highlights the crucial impact of query selectivity, dataset size, and data distribution on index performance. Existing educational tools were reviewed to identify gaps in interactivity, scope focus, and feedback mechanisms. The analysis of existing educational tools revealed a lack of interactivity, limited coverage, and insufficient feedback mechanisms for teaching students how to write efficient SQL queries. Based on these insights, a locally runnable browser-based application was created, featuring structured lessons, practical exercises on index creation and writing SQL queries, automated evaluation of query correctness and performance, and insights derived from query execution plans.
Description
Keywords
PostgreSQL, optimaliza dotazů, strategie indexování, B-strom, interaktivní výuka, exekuční plán, jednostránková webová aplikace, Docker, NextJS, automatická evaluace, PostgreSQL, query optimization, indexing strategies, B-tree, interactive learning, execution plan, single-page application, Docker, NextJS, automatic evaluation
Citation
Underlying research data set URL
Permanent link
Rights/License
Vysokoškolská závěrečná práce je dílo chráněné autorským zákonem. Je možné pořizovat z něj na své náklady a pro svoji osobní potřebu výpisy, opisy a rozmnoženiny. Jeho využití musí být v souladu s autorským zákonem v platném znění.
A university thesis is a work protected by the Copyright Act of the Czech Republic. Extracts, copies and transcripts of the thesis are allowed for personal use only and at one`s own expense. The use of thesis should be in compliance with the Copyright Act.
A university thesis is a work protected by the Copyright Act of the Czech Republic. Extracts, copies and transcripts of the thesis are allowed for personal use only and at one`s own expense. The use of thesis should be in compliance with the Copyright Act.