explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XJ4j : Optimization for: plan #QilB

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.040 3.739 ↑ 1.0 1 1

Aggregate (cost=6,755.72..6,755.73 rows=1 width=0) (actual time=3.739..3.739 rows=1 loops=1)

2. 0.311 3.699 ↓ 2.1 356 1

Merge Anti Join (cost=0.98..6,755.30 rows=169 width=0) (actual time=0.034..3.699 rows=356 loops=1)

  • Merge Cond: (cp1.id = cp2.id)
  • Join Filter: (cp2.first_prediction_label = pds.category_code)
  • Rows Removed by Join Filter: 356
3. 0.543 3.174 ↓ 2.6 779 1

Nested Loop (cost=0.71..6,653.51 rows=304 width=19) (actual time=0.016..3.174 rows=779 loops=1)

4. 0.294 0.294 ↑ 1.0 779 1

Index Scan using category_predictions_pkey on category_predictions cp1 (cost=0.28..95.28 rows=779 width=16) (actual time=0.007..0.294 rows=779 loops=1)

  • Filter: (NOT user_decision_done)
  • Rows Removed by Filter: 1
5. 2.337 2.337 ↑ 1.0 1 779

Index Scan using product_data_sheet_pkey on product_data_sheet pds (cost=0.43..8.41 rows=1 width=19) (actual time=0.003..0.003 rows=1 loops=779)

  • Index Cond: (id = cp1.id)
  • Filter: (product_data_sheet_type = 'masterProductDataSheet'::text)
6. 0.214 0.214 ↑ 1.0 780 1

Index Scan using category_predictions_pkey on category_predictions cp2 (cost=0.28..95.28 rows=780 width=19) (actual time=0.003..0.214 rows=780 loops=1)