explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7sTO

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Unique (cost=1,210,211.16..1,233,110.94 rows=4,579,956 width=8) (actual rows= loops=)

2.          

CTE _tree

3. 0.000 0.000 ↓ 0.0

Recursive Union (cost=0.29..682.40 rows=71 width=178) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Index Scan using node_pkey on node (cost=0.29..8.30 rows=1 width=178) (actual rows= loops=)

  • Index Cond: (id = 14713)
  • Filter: active
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.28..67.27 rows=7 width=178) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

WorkTable Scan on _tree _tree_1 (cost=0.00..0.20 rows=10 width=8) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Index Scan using pricing_hierarchy_node_parent_active_isactive_idx on node node_1 (cost=0.28..6.69 rows=1 width=174) (actual rows= loops=)

  • Index Cond: (parent_id = _tree_1.id)
8. 0.000 0.000 ↓ 0.0

Sort (cost=1,209,528.76..1,220,978.65 rows=4,579,956 width=8) (actual rows= loops=)

  • Sort Key: association.id
9. 0.000 0.000 ↓ 0.0

Hash Join (cost=2.31..640,209.07 rows=4,579,956 width=8) (actual rows= loops=)

  • Hash Cond: (association.node_id = _tree.id)
10. 0.000 0.000 ↓ 0.0

Seq Scan on tsin_node association (cost=0.00..483,617.42 rows=29,543,942 width=12) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash (cost=1.42..1.42 rows=71 width=4) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

CTE Scan on _tree (cost=0.00..1.42 rows=71 width=4) (actual rows= loops=)