explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9mvh

Settings
# exclusive inclusive rows x rows loops node
1. 25.382 59.278 ↓ 0.0 0 1

Hash Join (cost=26.01..525.89 rows=34 width=56) (actual time=59.271..59.278 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.118 0.153 ↓ 1.2 10 1

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

  • Recheck Cond: ((user_id = '1693876180748338218'::bigint) AND (status = 7401))
  • Heap Blocks: exact=7
4. 0.035 0.035 ↓ 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.027..0.035 rows=10 loops=1)

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

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

6. 0.100 0.430 ↓ 1.2 10 1

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

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

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

8.          

SubPlan (forHash Join)

9. 19.836 19.836 ↑ 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.013..0.116 rows=12 loops=171)

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

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

11. 3.933 3.933 ↑ 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.016..0.023 rows=1 loops=171)

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