explain.depesz.com

PostgreSQL's explain analyze made readable

Result: q3H4

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 2,311.443 ↑ 1.0 1 1

Limit (cost=1.43..17.56 rows=1 width=208) (actual time=2,311.440..2,311.443 rows=1 loops=1)

2. 11.919 2,311.438 ↑ 18,161.0 1 1

WindowAgg (cost=1.43..292,947.23 rows=18,161 width=208) (actual time=2,311.438..2,311.438 rows=1 loops=1)

3. 25.176 2,299.519 ↓ 1.1 20,236 1

Nested Loop Left Join (cost=1.43..292,720.22 rows=18,161 width=200) (actual time=2,167.751..2,299.519 rows=20,236 loops=1)

4. 5.014 2,254.107 ↓ 1.1 20,236 1

Nested Loop (cost=1.14..285,300.55 rows=18,161 width=197) (actual time=2,167.729..2,254.107 rows=20,236 loops=1)

5. 192.917 2,228.857 ↓ 1.1 20,236 1

Merge Semi Join (cost=0.86..279,897.15 rows=18,161 width=189) (actual time=2,167.712..2,228.857 rows=20,236 loops=1)

  • Merge Cond: (fr.id = latest_file_results.file_results_id)
6. 1,492.132 1,492.132 ↑ 1.0 3,906,592 1

Index Scan using file_results_pkey on file_results fr (cost=0.43..172,471.81 rows=4,074,704 width=189) (actual time=0.010..1,492.132 rows=3,906,592 loops=1)

7. 543.808 543.808 ↓ 1.1 20,236 1

Index Scan using latest_file_results_file_results_id_ix on latest_file_results (cost=0.43..97,559.76 rows=18,161 width=8) (actual time=496.569..543.808 rows=20,236 loops=1)

  • Filter: (product_context_id = 464)
  • Rows Removed by Filter: 2506741
8. 20.236 20.236 ↑ 1.0 1 20,236

Index Scan using scan_requests_pkey on scan_requests req (cost=0.28..0.30 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=20,236)

  • Index Cond: (id = fr.request_id)
9. 20.236 20.236 ↓ 0.0 0 20,236

Index Scan using file_comments_md5_ux on file_comments fc (cost=0.29..0.40 rows=1 width=124) (actual time=0.001..0.001 rows=0 loops=20,236)

  • Index Cond: ((product_id = fr.product_id) AND (context_id = req.product_context_id) AND (md5(file_name) = md5(((fr.filepath || '/'::text) || fr.filename))))
  • Filter: (file_name = ((fr.filepath || '/'::text) || fr.filename))