explain.depesz.com

PostgreSQL's explain analyze made readable

Result: T34d

Settings
# exclusive inclusive rows x rows loops node
1. 234.850 1,927.517 ↓ 2,129.3 1,151,964 1

Nested Loop (cost=21,742.83..48,472.82 rows=541 width=1,609) (actual time=64.186..1,927.517 rows=1,151,964 loops=1)

2. 0.051 0.051 ↓ 4.0 8 1

Index Scan using idx_asset_customer on asset a (cost=0.28..12.40 rows=2 width=737) (actual time=0.016..0.051 rows=8 loops=1)

  • Index Cond: (customerid = 594)
  • Filter: active
3. 1,094.592 1,692.616 ↓ 227.5 143,996 8

Bitmap Heap Scan on link l (cost=21,742.55..24,223.88 rows=633 width=872) (actual time=79.811..211.577 rows=143,996 loops=8)

  • Recheck Cond: ((assetid = a.assetid) AND (customerid = 594))
  • Rows Removed by Index Recheck: 118404
  • Heap Blocks: exact=241069 lossy=34232
4. 17.728 598.024 ↓ 0.0 0 8

BitmapAnd (cost=21,742.55..21,742.55 rows=633 width=0) (actual time=74.753..74.753 rows=0 loops=8)

5. 78.456 78.456 ↓ 13.1 144,006 8

Bitmap Index Scan on idx_link_asset (cost=0.00..206.87 rows=10,991 width=0) (actual time=9.807..9.807 rows=144,006 loops=8)

  • Index Cond: (assetid = a.assetid)
6. 501.840 501.840 ↓ 1.0 1,152,004 8

Bitmap Index Scan on idx_link_customer (cost=0.00..21,247.69 rows=1,150,301 width=0) (actual time=62.730..62.730 rows=1,152,004 loops=8)

  • Index Cond: (customerid = 594)
Planning time : 0.464 ms
Execution time : 1,970.316 ms