Глава 71. Как планировщик использует статистику
Содержание
Данная глава основана на материалах, рассмотренных ранее (см. Раздел 14.1 и Раздел 14.2), и подробнее рассказывает о том, как планировщик использует статистику для определения количества строк, которое может вернуть каждая часть запроса. Это важная составляющая процесса создания плана запроса, предоставляющая большую часть исходного материала для расчёта стоимости.
Целью данной главы является не подробное документирование кода, а общее описание его работы. Возможно, это поможет тем, кто пожелает в дальнейшем ознакомиться с кодом.
Appendix M. Demo Database “Airlines”
Table of Contents
This is an overview of a demo database for Postgres Pro. This appendix describes the database schema, which consists of eight tables and several views. The subject field of this database is airline flights in Russia. You can download the database from our website. See Section M.1 for details.
Figure M.1. Airlines in Russia

You can use this database for various purposes, such as:
learning SQL language on your own
preparing books, manuals, and courses on SQL
showing Postgres Pro features in stories and articles
When developing this demo database, we pursued several goals:
Database schema must be simple enough to be understood without extra explanations.
At the same time, database schema must be complex enough to allow writing meaningful queries.
The database must contain true-to-life data that will be interesting to work with.
This demo database is distributed under the PostgreSQL license.
You can send us your feedback to edu@postgrespro.ru.