explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8D4k

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 4.286 ↓ 0.0 0 1

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

  • Group Key: query.human_document, query.full_name
2. 0.010 4.285 ↓ 0.0 0 1

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

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

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

4. 0.001 4.274 ↓ 0.0 0 1

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

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

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

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

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

7. 0.006 4.203 ↓ 0.0 0 1

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

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

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

9. 0.005 4.186 ↓ 0.0 0 1

Hash (cost=269.25..269.25 rows=1 width=62) (actual time=4.183..4.186 rows=0 loops=1)

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

Seq Scan on human (cost=0.00..269.25 rows=1 width=62) (actual time=4.181..4.181 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 : 6.508 ms
Execution time : 4.403 ms