PostgreSQL Query Optimization Год издания: 2024 Автор: Dombrovskaya H., Novikov B., Bailliekova A. Издательство: Apress ISBN: 979-8-8688-0069-6 Язык: Английский Формат: PDF Качество: Издательский макет или текст (eBook) Интерактивное оглавление: Да Количество страниц: 583 Описание: Write optimized queries. This book helps you write queries that perform fast and deliver results on time. You will learn that query optimization is not a dark art practiced by a small, secretive cabal of sorcerers. Any motivated professional can learn to write efficient queries from the get-go and capably optimize existing queries. You will learn to look at the process of writing a query from the database engine’s point of view, and know how to think like the database optimizer. The book begins with a discussion of what a performant system is and progresses to measuring performance and setting performance goals. It introduces different classes of queries and optimization techniques suitable to each, such as the use of indexes and specific join algorithms. You will learn to read and understand query execution plans along with techniques for influencing those plans for better performance. The book also covers advanced topics such as the use of functions and procedures, dynamic SQL, and generated queries. All of these techniques are then used together to produce performant applications, avoiding the pitfalls of object-relational mappers. This second edition includes new examples using Postgres 15 and the newest version of the PostgresAir database. It includes additional details and clarifications about advanced topics, and covers configuration parameters in greater depth. Finally, it makes use of advancements in NORM, using automatically generated functions. What You Will Learn: - Identify optimization goals in OLTP and OLAP systems - Read and understand PostgreSQL execution plans - Distinguish between short queries and long queries - Choose the right optimization technique for each query type - Identify indexes that will improve query performance - Optimize full table scans - Avoid the pitfalls of object-relational mapping systems - Optimize the entire application rather than just database queries
Примеры страниц
Оглавление
About the Authors xiii About the Technical Reviewer xv Acknowledgments xvii Introduction xix Chapter 1: Why Optimize? 1 Chapter 2: Theory: Yes, We Need It! 15 Chapter 3: Even More Theory: Algorithms 25 Chapter 4: Understanding Execution Plans 47 Chapter 5: Short Queries and Indexes 61 Chapter 6: Long Queries and Full Scans 105 Chapter 7: Long Queries: Additional Techniques 147 Chapter 8: Optimizing Data Modification 175 Chapter 9: Design Matters 185 Chapter 10: What About Configuration Parameters? 205 Chapter 11: Application Development and Performance 217 Chapter 12: Functions 231 Chapter 13: Dynamic SQL 265 Chapter 14: Avoiding the Pitfalls of Object-Relational Mapping 291 Chapter 15: More Complex Filtering and Search 317 Chapter 16: Ultimate Optimization Algorithm 327 Chapter 17: Conclusion 333 Index 335
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum