explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 26f2

Settings
# exclusive inclusive rows x rows loops node
1. 27.066 57.976 ↓ 0.0 0 1

Hash Join (cost=26.01..525.89 rows=34 width=56) (actual time=57.969..57.976 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.205 0.289 ↓ 1.2 10 1

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

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

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

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

6. 0.145 0.685 ↓ 1.2 10 1

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

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

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

8.          

SubPlan (forHash Join)

9. 20.520 20.520 ↑ 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.015..0.120 rows=12 loops=171)

  • Index Cond: (client_view_id = uv.id)
10. 5.130 5.130 ↑ 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.030 rows=1 loops=171)

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