explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Xp18

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Group (cost=340.91..340.92 rows=1 width=62) (actual rows= loops=)

  • Group Key: query.human_document, query.full_name
2. 0.000 0.000 ↓ 0.0

Sort (cost=340.91..340.91 rows=1 width=62) (actual rows= loops=)

  • Sort Key: query.human_document, query.full_name
3. 0.000 0.000 ↓ 0.0

Subquery Scan on query (cost=340.86..340.90 rows=1 width=62) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=340.86..340.89 rows=1 width=78) (actual rows= loops=)

  • Group Key: human.human_document, (date_part('month'::text, flight.date_from))
  • Filter: (count(*) >= 2)
5. 0.000 0.000 ↓ 0.0

Sort (cost=340.86..340.87 rows=1 width=70) (actual rows= loops=)

  • Sort Key: human.human_document, (date_part('month'::text, flight.date_from))
6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=269.68..340.85 rows=1 width=70) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Hash Join (cost=269.26..337.55 rows=1 width=66) (actual rows= loops=)

  • Hash Cond: ((ticket.human_document)::text = (human.human_document)::text)
8. 0.000 0.000 ↓ 0.0

Seq Scan on ticket (cost=0.00..60.95 rows=2,795 width=16) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Hash (cost=269.25..269.25 rows=1 width=62) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on human (cost=0.00..269.25 rows=1 width=62) (actual rows= loops=)

  • Filter: ((full_name)::text ~~ '%„®­ «м¤%'::text)
11. 0.000 0.000 ↓ 0.0

Index Scan using flight_pkey on flight (cost=0.42..3.30 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (id_flight = ticket.flight)
  • Filter: (date_from >= (CURRENT_DATE - 365))