explain.depesz.com

PostgreSQL's explain analyze made readable

Result: C18z

Settings
# exclusive inclusive rows x rows loops node
1. 25.950 62.284 ↓ 0.0 0 1

Hash Join (cost=26.01..525.89 rows=34 width=56) (actual time=62.277..62.284 rows=0 loops=1)

  • Hash Cond: (dc.default_type = uv.default_type)
  • Join Filter: ((NOT (SubPlan 2)) OR (dc.status <> (SubPlan 3)))
  • Rows Removed by Join Filter: 171
2.          

CTE user_views

3. 0.136 0.214 ↓ 1.2 10 1

Bitmap Heap Scan on client_view c (cost=4.36..25.75 rows=8 width=12) (actual time=0.097..0.214 rows=10 loops=1)

  • Recheck Cond: ((user_id = '1693876180748338218'::bigint) AND (status = 7401))
  • Heap Blocks: exact=7
4. 0.078 0.078 ↓ 1.2 10 1

Bitmap Index Scan on idx_client_view_user_id_status (cost=0.00..4.36 rows=8 width=0) (actual time=0.070..0.078 rows=10 loops=1)

  • Index Cond: ((user_id = '1693876180748338218'::bigint) AND (status = 7401))
5. 4.184 4.184 ↑ 1.8 463 1

Seq Scan on default_cols dc (cost=0.00..18.50 rows=850 width=52) (actual time=0.018..4.184 rows=463 loops=1)

6. 0.104 0.515 ↓ 1.2 10 1

Hash (cost=0.16..0.16 rows=8 width=12) (actual time=0.507..0.515 rows=10 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 0.411 0.411 ↓ 1.2 10 1

CTE Scan on user_views uv (cost=0.00..0.16 rows=8 width=12) (actual time=0.116..0.411 rows=10 loops=1)

8.          

SubPlan (forHash Join)

9. 20.691 20.691 ↑ 1.8 12 171

Index Scan using idx_viewable_column_client_view_id on viewable_column vc (cost=0.29..9.21 rows=22 width=11) (actual time=0.016..0.121 rows=12 loops=171)

  • Index Cond: (client_view_id = uv.id)
10. 6.156 10.944 ↑ 1.0 1 171

Limit (cost=0.29..9.27 rows=1 width=4) (actual time=0.036..0.064 rows=1 loops=171)

11. 4.788 4.788 ↑ 1.0 1 171

Index Scan using idx_viewable_column_client_view_id on viewable_column vc_1 (cost=0.29..9.27 rows=1 width=4) (actual time=0.018..0.028 rows=1 loops=171)

  • Index Cond: (client_view_id = uv.id)
  • Filter: (dc.display_name = display_name)
  • Rows Removed by Filter: 11