explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hrYB

Settings
# exclusive inclusive rows x rows loops node
1. 0.027 76.346 ↑ 1.5 69 1

Group (cost=1,399.90..1,400.67 rows=103 width=62) (actual time=76.315..76.346 rows=69 loops=1)

  • Group Key: query.human_document, query.full_name
2. 0.089 76.319 ↑ 1.5 69 1

Sort (cost=1,399.90..1,400.16 rows=103 width=62) (actual time=76.314..76.319 rows=69 loops=1)

  • Sort Key: query.human_document, query.full_name
  • Sort Method: quicksort Memory: 34kB
3. 0.010 76.230 ↑ 1.5 69 1

Subquery Scan on query (cost=1,388.20..1,396.46 rows=103 width=62) (actual time=75.991..76.230 rows=69 loops=1)

4. 0.260 76.220 ↑ 1.5 69 1

GroupAggregate (cost=1,388.20..1,395.43 rows=103 width=78) (actual time=75.990..76.220 rows=69 loops=1)

  • Group Key: human.human_document, (date_part('month'::text, flight.date_from))
  • Filter: (count(*) >= 2)
  • Rows Removed by Filter: 142
5. 1.933 75.960 ↓ 1.1 330 1

Sort (cost=1,388.20..1,388.97 rows=310 width=70) (actual time=75.932..75.960 rows=330 loops=1)

  • Sort Key: human.human_document, (date_part('month'::text, flight.date_from))
  • Sort Method: quicksort Memory: 71kB
6. 0.545 74.027 ↓ 1.1 330 1

Nested Loop (cost=283.69..1,375.37 rows=310 width=70) (actual time=47.298..74.027 rows=330 loops=1)

7. 1.245 3.522 ↓ 1.1 330 1

Hash Join (cost=283.27..351.56 rows=310 width=66) (actual time=1.607..3.522 rows=330 loops=1)

  • Hash Cond: ((ticket.human_document)::text = (human.human_document)::text)
8. 0.703 0.703 ↑ 1.0 2,795 1

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

9. 0.200 1.574 ↑ 1.0 1,102 1

Hash (cost=269.25..269.25 rows=1,122 width=62) (actual time=1.569..1.574 rows=1,102 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 118kB
10. 1.374 1.374 ↑ 1.0 1,102 1

Seq Scan on human (cost=0.00..269.25 rows=1,122 width=62) (actual time=0.010..1.374 rows=1,102 loops=1)

  • Filter: ((human_document)::text ~~ '2%'::text)
  • Rows Removed by Filter: 8998
11. 69.960 69.960 ↑ 1.0 1 330

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

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