explain.depesz.com

PostgreSQL's explain analyze made readable

Result: a6p3

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 7.554 ↑ 1.5 69 1

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

  • Group Key: query.human_document, query.full_name
2. 0.045 7.539 ↑ 1.5 69 1

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

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

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

4. 0.131 7.487 ↑ 1.5 69 1

GroupAggregate (cost=1,388.20..1,395.43 rows=103 width=78) (actual time=7.361..7.487 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. 0.967 7.356 ↓ 1.1 330 1

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

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

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

7. 0.572 2.232 ↓ 1.1 330 1

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

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

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

9. 0.217 1.397 ↑ 1.0 1,102 1

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

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

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

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

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

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