explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tjDn

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 0.199 ↓ 1.3 4 1

Nested Loop Left Join (cost=8.19..9.36 rows=3 width=167) (actual time=0.186..0.199 rows=4 loops=1)

  • Join Filter: (prime_condition_types.id = prime_conditions.condition_type_id)
  • Rows Removed by Join Filter: 5
2. 0.008 0.181 ↓ 1.3 4 1

Merge Left Join (cost=8.19..8.25 rows=3 width=113) (actual time=0.175..0.181 rows=4 loops=1)

  • Merge Cond: (prime_benefits.benefit_type_id = prime_benefit_types.id)
3. 0.011 0.163 ↓ 1.3 4 1

Sort (cost=7.13..7.14 rows=3 width=95) (actual time=0.162..0.163 rows=4 loops=1)

  • Sort Key: prime_benefits.benefit_type_id
  • Sort Method: quicksort Memory: 25kB
4. 0.015 0.152 ↓ 1.3 4 1

Hash Left Join (cost=2.64..7.11 rows=3 width=95) (actual time=0.136..0.152 rows=4 loops=1)

  • Hash Cond: ((prime_benefit_condition.prime_condition_id = prime_conditions.id) AND (prime_informations.id = prime_conditions.prime_information_id))
5. 0.015 0.128 ↓ 1.3 4 1

Hash Left Join (cost=1.54..5.97 rows=3 width=94) (actual time=0.117..0.128 rows=4 loops=1)

  • Hash Cond: (prime_benefits.id = prime_benefit_condition.prime_benefit_id)
6. 0.009 0.104 ↑ 1.0 3 1

Nested Loop (cost=0.42..4.82 rows=3 width=94) (actual time=0.097..0.104 rows=3 loops=1)

  • Join Filter: (prime_details.prime_information_id = prime_benefits.prime_information_id)
  • Rows Removed by Join Filter: 2
7. 0.004 0.092 ↑ 1.0 1 1

Nested Loop (cost=0.42..3.69 rows=1 width=8) (actual time=0.091..0.092 rows=1 loops=1)

  • Join Filter: (prime_details.prime_information_id = prime_informations.id)
  • Rows Removed by Join Filter: 1
8. 0.084 0.084 ↑ 1.0 1 1

Index Scan using prime_details_pkey on prime_details (cost=0.42..2.64 rows=1 width=4) (actual time=0.083..0.084 rows=1 loops=1)

  • Index Cond: (application_user_id = 1423898)
  • Filter: (ends_at >= '2018-12-03 11:03:08.990676'::timestamp without time zone)
9. 0.004 0.004 ↑ 1.0 2 1

Seq Scan on prime_informations (cost=0.00..1.02 rows=2 width=4) (actual time=0.003..0.004 rows=2 loops=1)

  • Filter: is_active
10. 0.003 0.003 ↑ 1.0 5 1

Seq Scan on prime_benefits (cost=0.00..1.07 rows=5 width=94) (actual time=0.001..0.003 rows=5 loops=1)

  • Filter: is_active
  • Rows Removed by Filter: 2
11. 0.006 0.009 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=8) (actual time=0.009..0.009 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
12. 0.003 0.003 ↑ 1.0 5 1

Seq Scan on prime_benefit_condition (cost=0.00..1.05 rows=5 width=8) (actual time=0.001..0.003 rows=5 loops=1)

13. 0.005 0.009 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=17) (actual time=0.009..0.009 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 0.004 0.004 ↑ 1.0 4 1

Seq Scan on prime_conditions (cost=0.00..1.04 rows=4 width=17) (actual time=0.002..0.004 rows=4 loops=1)

15. 0.007 0.010 ↓ 1.3 4 1

Sort (cost=1.05..1.06 rows=3 width=22) (actual time=0.010..0.010 rows=4 loops=1)

  • Sort Key: prime_benefit_types.id
  • Sort Method: quicksort Memory: 25kB
16. 0.003 0.003 ↑ 1.0 3 1

Seq Scan on prime_benefit_types (cost=0.00..1.03 rows=3 width=22) (actual time=0.002..0.003 rows=3 loops=1)

17. 0.007 0.008 ↑ 1.0 2 4

Materialize (cost=0.00..1.03 rows=2 width=58) (actual time=0.001..0.002 rows=2 loops=4)

18. 0.001 0.001 ↑ 1.0 2 1

Seq Scan on prime_condition_types (cost=0.00..1.02 rows=2 width=58) (actual time=0.001..0.001 rows=2 loops=1)