explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zbEK

Settings
# exclusive inclusive rows x rows loops node
1. 0.041 14.373 ↑ 1.5 69 1

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

  • Group Key: query.human_document, query.full_name
2. 0.266 14.332 ↑ 1.5 69 1

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

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

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

4. 0.359 14.047 ↑ 1.5 69 1

GroupAggregate (cost=1,388.20..1,395.43 rows=103 width=78) (actual time=13.694..14.047 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. 2.618 13.688 ↓ 1.1 330 1

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

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

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

7. 1.413 6.333 ↓ 1.1 330 1

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

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

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

9. 0.687 4.240 ↑ 1.0 1,102 1

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

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

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

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

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

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