explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Qdfk

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 62.954 ↑ 1,481.7 11 1

Sort (cost=18,247.69..18,288.43 rows=16,299 width=216) (actual time=62.953..62.954 rows=11 loops=1)

  • Sort Key: fr.id
  • Sort Method: quicksort Memory: 27kB
2.          

CTE latest

3. 4.321 4.321 ↓ 1.1 20,236 1

Index Scan using latest_file_results_product_context_id_ix on latest_file_results (cost=0.43..15,113.00 rows=18,161 width=8) (actual time=0.019..4.321 rows=20,236 loops=1)

  • Index Cond: (product_context_id = 464)
4. 0.028 62.943 ↑ 1,481.7 11 1

WindowAgg (cost=991.71..1,994.36 rows=16,299 width=216) (actual time=62.937..62.943 rows=11 loops=1)

5. 0.057 62.915 ↑ 1,481.7 11 1

Hash Left Join (cost=991.71..1,749.88 rows=16,299 width=200) (actual time=23.340..62.915 rows=11 loops=1)

  • Hash Cond: ((fr.product_id = fc.product_id) AND (req.product_context_id = fc.context_id) AND (((fr.filepath || '/'::text) || fr.filename) = fc.file_name) AND (md5(((fr.filepath || '/'::text) || fr.filename)) = md5(fc.file_name)))
6. 0.023 56.324 ↑ 1,481.7 11 1

Hash Join (cost=597.72..1,172.53 rows=16,299 width=197) (actual time=16.786..56.324 rows=11 loops=1)

  • Hash Cond: (fr.request_id = req.id)
7. 0.000 54.987 ↑ 1,481.7 11 1

Nested Loop (cost=409.05..941.02 rows=16,299 width=189) (actual time=15.461..54.987 rows=11 loops=1)

8. 7.645 15.125 ↓ 101.2 20,236 1

HashAggregate (cost=408.62..410.62 rows=200 width=8) (actual time=11.258..15.125 rows=20,236 loops=1)

  • Group Key: latest.id
9. 7.480 7.480 ↓ 1.1 20,236 1

CTE Scan on latest (cost=0.00..363.22 rows=18,161 width=8) (actual time=0.020..7.480 rows=20,236 loops=1)

10. 40.472 40.472 ↓ 0.0 0 20,236

Index Scan using file_results_pkey on file_results fr (cost=0.43..2.65 rows=1 width=189) (actual time=0.002..0.002 rows=0 loops=20,236)

  • Index Cond: (id = latest.id)
  • Filter: (upper(filename) ~~ '%JAVA%'::text)
  • Rows Removed by Filter: 1
11. 0.354 1.314 ↓ 1.0 3,619 1

Hash (cost=143.85..143.85 rows=3,585 width=16) (actual time=1.314..1.314 rows=3,619 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 202kB
12. 0.960 0.960 ↓ 1.0 3,619 1

Seq Scan on scan_requests req (cost=0.00..143.85 rows=3,585 width=16) (actual time=0.012..0.960 rows=3,619 loops=1)

13. 5.162 6.534 ↑ 1.0 7,733 1

Hash (cost=239.33..239.33 rows=7,733 width=124) (actual time=6.534..6.534 rows=7,733 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 1290kB
14. 1.372 1.372 ↑ 1.0 7,733 1

Seq Scan on file_comments fc (cost=0.00..239.33 rows=7,733 width=124) (actual time=0.009..1.372 rows=7,733 loops=1)