explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kwny

Settings
# exclusive inclusive rows x rows loops node
1. 18.065 1,715.631 ↓ 105,933.0 105,933 1

Nested Loop (cost=4.92..4,827.26 rows=1 width=237) (actual time=0.126..1,715.631 rows=105,933 loops=1)

2. 1.502 19.066 ↓ 1,500.0 1,500 1

Nested Loop (cost=2.05..4,366.35 rows=1 width=133) (actual time=0.054..19.066 rows=1,500 loops=1)

  • Join Filter: (i.ptn = partition.ptn)
3. 0.128 16.064 ↓ 9.0 1,500 1

Nested Loop (cost=1.77..4,224.75 rows=167 width=113) (actual time=0.041..16.064 rows=1,500 loops=1)

  • Join Filter: (entity_type.id = e.entity_type_ref)
4. 0.689 0.936 ↑ 1.0 1,500 1

Hash Join (cost=1.20..47.00 rows=1,500 width=109) (actual time=0.023..0.936 rows=1,500 loops=1)

  • Hash Cond: (i.entity_type = entity_type.value)
5. 0.238 0.238 ↑ 1.0 1,500 1

Seq Scan on fqeid_temp i (cost=0.00..40.00 rows=1,500 width=99) (actual time=0.009..0.238 rows=1,500 loops=1)

6. 0.004 0.009 ↑ 1.0 9 1

Hash (cost=1.09..1.09 rows=9 width=21) (actual time=0.009..0.009 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 0.005 0.005 ↑ 1.0 9 1

Seq Scan on entity_type (cost=0.00..1.09 rows=9 width=21) (actual time=0.003..0.005 rows=9 loops=1)

8. 15.000 15.000 ↑ 1.0 1 1,500

Index Scan using entity_id_value_key on entity e (cost=0.56..2.77 rows=1 width=49) (actual time=0.009..0.010 rows=1 loops=1,500)

  • Index Cond: (id_value = i.id_value)
9. 1.500 1.500 ↑ 1.0 1 1,500

Index Scan using partition_pkey on partition (cost=0.29..0.84 rows=1 width=79) (actual time=0.001..0.001 rows=1 loops=1,500)

  • Index Cond: (id = e.partition_ref)
10. 30.000 1,678.500 ↑ 1.0 71 1,500

Nested Loop (cost=2.87..460.20 rows=71 width=126) (actual time=0.015..1.119 rows=71 loops=1,500)

11. 39.000 1,222.500 ↑ 1.0 71 1,500

Nested Loop (cost=2.30..180.71 rows=71 width=51) (actual time=0.012..0.815 rows=71 loops=1,500)

12. 11.992 12.000 ↑ 1.0 71 1,500

HashAggregate (cost=1.89..2.60 rows=71 width=71) (actual time=0.000..0.008 rows=71 loops=1,500)

  • Group Key: prop_def_temp.prop_def_input
13. 0.008 0.008 ↑ 1.0 71 1

Seq Scan on prop_def_temp (cost=0.00..1.71 rows=71 width=71) (actual time=0.004..0.008 rows=71 loops=1)

14. 1,171.500 1,171.500 ↑ 1.0 1 106,500

Index Scan using property_definition_key on property_definition p (cost=0.41..2.51 rows=1 width=51) (actual time=0.011..0.011 rows=1 loops=106,500)

  • Index Cond: (key = prop_def_temp.prop_def_input)
15. 0.000 426.000 ↑ 2.0 1 106,500

Append (cost=0.57..3.92 rows=2 width=83) (actual time=0.003..0.004 rows=1 loops=106,500)

16. 319.500 319.500 ↑ 1.0 1 106,500

Index Scan using property_property_definition_id_entity_ref on property (cost=0.57..2.76 rows=1 width=83) (actual time=0.003..0.003 rows=1 loops=106,500)

  • Index Cond: ((property_definition_id = p.id) AND (entity_ref = e.id))
  • Filter: ((effective_at_range @> '2020-01-01 00:00:00+00'::timestamp with time zone) AND (as_at_range @> transaction_timestamp()))
17. 106.500 106.500 ↓ 0.0 0 106,500

Index Scan using property_history_property_definition_id_entity_ref on property_history (cost=0.42..1.15 rows=1 width=107) (actual time=0.001..0.001 rows=0 loops=106,500)

  • Index Cond: ((property_definition_id = p.id) AND (entity_ref = e.id))
  • Filter: ((effective_at_range @> '2020-01-01 00:00:00+00'::timestamp with time zone) AND (as_at_range @> transaction_timestamp()))
Planning time : 2.328 ms
Execution time : 1,719.613 ms