explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Om9S

Settings
# exclusive inclusive rows x rows loops node
1. 8.023 65,568.499 ↓ 29.8 626 1

Nested Loop (cost=0.28..13,397.76 rows=21 width=46) (actual time=444.811..65,568.499 rows=626 loops=1)

  • Join Filter: ((pgr.lft > pgr3.lft) AND (pgr.rgt < pgr3.rgt) AND (pgr.level > pgr3.level))
  • Rows Removed by Join Filter: 2
2. 0.039 0.039 ↑ 1.0 1 1

Index Scan using idx_pgr_pgr_id on eis_product_group pgr3 (cost=0.28..8.29 rows=1 width=10) (actual time=0.009..0.039 rows=1 loops=1)

  • Index Cond: (pgr_id = 4792)
3. 1.335 1.335 ↓ 1.1 628 1

Seq Scan on eis_product_group pgr (cost=0.00..47.74 rows=574 width=38) (actual time=0.007..1.335 rows=628 loops=1)

4.          

SubPlan (for Nested Loop)

5. 255.408 65,559.102 ↑ 1.0 1 626

Aggregate (cost=634.83..634.84 rows=1 width=8) (actual time=104.726..104.727 rows=1 loops=626)

6. 33,566.120 65,303.694 ↑ 21.8 146 626

Hash Join (cost=51.41..626.86 rows=3,187 width=0) (actual time=46.464..104.319 rows=146 loops=626)

  • Hash Cond: (eis_product_product_group.ppg_pgr_id = pgr2.pgr_id)
7. 31,623.016 31,623.016 ↑ 1.0 28,586 626

Seq Scan on eis_product_product_group (cost=0.00..499.86 rows=28,586 width=4) (actual time=0.008..50.516 rows=28,586 loops=626)

8. 11.268 114.558 ↑ 21.3 3 626

Hash (cost=50.61..50.61 rows=64 width=4) (actual time=0.183..0.183 rows=3 loops=626)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 103.290 103.290 ↑ 21.3 3 626

Seq Scan on eis_product_group pgr2 (cost=0.00..50.61 rows=64 width=4) (actual time=0.070..0.165 rows=3 loops=626)

  • Filter: ((lft >= pgr.lft) AND (rgt <= pgr.rgt))
  • Rows Removed by Filter: 625
Planning time : 0.465 ms
Execution time : 65,569.658 ms