Materialized postgresql. Postgresql план запроса. postgresql карта видимости. план исполнения postgres. nested loops.