explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4yXr

Settings
# exclusive inclusive rows x rows loops node
1. 1.135 16.665 ↓ 27.8 250 1

HashAggregate (cost=4,484.92..4,485.01 rows=9 width=321) (actual time=16.572..16.665 rows=250 loops=1)

  • Group Key: mr.id, mr.job_id, mr.matched_compared_result_id, mr.trusted_rpc, mr.trusted_upc, cr.img_hash
2. 1.356 15.530 ↓ 166.1 1,495 1

Nested Loop (cost=102.25..4,484.79 rows=9 width=321) (actual time=1.387..15.530 rows=1,495 loops=1)

3. 2.941 3.304 ↓ 6.9 1,087 1

Bitmap Heap Scan on img_matched_results mr (cost=101.71..2,599.79 rows=157 width=313) (actual time=1.343..3.304 rows=1,087 loops=1)

  • Recheck Cond: (job_id = '689260'::bigint)
  • Filter: (is_secondary AND (matched_compared_result_id IS NOT NULL) AND (s3_img_url IS NOT NULL) AND (img_checksum IS NOT NULL) AND (NOT is_img_unchanged) AND (NOT is_reviewed))
  • Rows Removed by Filter: 2,470
  • Heap Blocks: exact=196
4. 0.363 0.363 ↓ 1.1 3,557 1

Bitmap Index Scan on idx_img_matched_results_on_job_id (cost=0.00..101.67 rows=3,384 width=0) (actual time=0.363..0.363 rows=3,557 loops=1)

  • Index Cond: (job_id = '689260'::bigint)
5. 10.870 10.870 ↑ 1.0 1 1,087

Index Scan using idx_img_compared_results_on_img_matched_results_id_s3_img_url on img_compared_results cr (cost=0.54..12.00 rows=1 width=32) (actual time=0.008..0.010 rows=1 loops=1,087)

  • Index Cond: (img_matched_results_id = mr.id)
  • Filter: ((img_hash IS NOT NULL) AND (job_id = '689260'::bigint))
  • Rows Removed by Filter: 1
Planning time : 1.440 ms
Execution time : 16.794 ms