explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xvJB

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

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

  • Group Key: query.human_document, query.full_name
2. 0.036 4.613 ↓ 0.0 0 1

Sort (cost=340.91..340.91 rows=1 width=62) (actual time=4.612..4.613 rows=0 loops=1)

  • Sort Key: query.human_document, query.full_name
  • Sort Method: quicksort Memory: 25kB
3. 0.002 4.577 ↓ 0.0 0 1

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

4. 0.002 4.575 ↓ 0.0 0 1

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

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

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

  • Sort Key: human.human_document, (date_part('month'::text, flight.date_from))
  • Sort Method: quicksort Memory: 25kB
6. 0.001 4.562 ↓ 0.0 0 1

Nested Loop (cost=269.68..340.85 rows=1 width=70) (actual time=4.561..4.562 rows=0 loops=1)

7. 0.028 4.561 ↓ 0.0 0 1

Hash Join (cost=269.26..337.55 rows=1 width=66) (actual time=4.560..4.561 rows=0 loops=1)

  • Hash Cond: ((ticket.human_document)::text = (human.human_document)::text)
8. 0.048 0.048 ↑ 2,795.0 1 1

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

9. 0.003 4.485 ↓ 0.0 0 1

Hash (cost=269.25..269.25 rows=1 width=62) (actual time=4.484..4.485 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
10. 4.482 4.482 ↓ 0.0 0 1

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

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

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

  • Index Cond: (id_flight = ticket.flight)
  • Filter: (date_from >= (CURRENT_DATE - 365))
Planning time : 1.458 ms
Execution time : 4.718 ms