explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ta9n

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 10.149 ↑ 1.0 10 1

Limit (cost=4,309.21..4,309.23 rows=10 width=714) (actual time=10.143..10.149 rows=10 loops=1)

2.          

Initplan (for Limit)

3. 0.009 0.009 ↓ 0.0 0 1

Seq Scan on product_sku__notsold_for_branch (cost=0.00..1.15 rows=1 width=0) (actual time=0.009..0.009 rows=0 loops=1)

  • Filter: (integration_products_from_jde__id = id)
  • Rows Removed by Filter: 15
4. 0.662 10.145 ↑ 232.6 10 1

Sort (cost=4,308.06..4,313.87 rows=2,326 width=714) (actual time=10.142..10.145 rows=10 loops=1)

  • Sort Key: cdms_referenceproduct.name
  • Sort Method: top-N heapsort Memory: 34kB
5. 0.167 9.483 ↑ 6.4 362 1

Result (cost=3,746.51..4,257.79 rows=2,326 width=714) (actual time=5.483..9.483 rows=362 loops=1)

  • One-Time Filter: (NOT $0)
6. 2.031 9.316 ↑ 6.4 362 1

Hash Join (cost=3,746.51..4,257.79 rows=2,326 width=714) (actual time=5.472..9.316 rows=362 loops=1)

  • Hash Cond: (product.cdms_referenceproduct__id = cdms_referenceproduct.id)
7. 1.837 1.837 ↓ 1.0 6,749 1

Seq Scan on product (cost=0.00..462.93 rows=6,693 width=46) (actual time=0.002..1.837 rows=6,749 loops=1)

8. 0.408 5.448 ↑ 6.5 362 1

Hash (cost=3,717.19..3,717.19 rows=2,345 width=668) (actual time=5.448..5.448 rows=362 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 249kB
9. 2.423 5.040 ↑ 6.5 362 1

Nested Loop (cost=3,700.83..3,717.19 rows=2,345 width=668) (actual time=2.481..5.040 rows=362 loops=1)

10. 0.430 2.617 ↓ 270.5 541 1

HashAggregate (cost=3,700.54..3,700.56 rows=2 width=5) (actual time=2.462..2.617 rows=541 loops=1)

  • Group Key: (products_from_jde.cdms_id_pr)::bigint
11. 2.187 2.187 ↓ 1.5 670 1

Bitmap Heap Scan on products_from_jde (cost=24.75..3,699.41 rows=453 width=5) (actual time=0.370..2.187 rows=670 loops=1)

  • Recheck Cond: ((external_branch_id)::text = '418400'::text)
  • Filter: ((cdms_id_pr IS NOT NULL) AND (NOT is_deleted) AND is_active)
  • Rows Removed by Filter: 1,049" Heap Blocks: exact=1,106