explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PJq34

Settings
# exclusive inclusive rows x rows loops node
1. 26.704 63.347 ↓ 0.0 0 1

Hash Join (cost=80.69..580.56 rows=34 width=56) (actual time=63.340..63.347 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.769 0.769 ↓ 1.2 10 1

Seq Scan on client_view c (cost=0.00..80.42 rows=8 width=12) (actual time=0.059..0.769 rows=10 loops=1)

  • Filter: ((user_id = '1693876180748338218'::bigint) AND (status = 7401))
  • Rows Removed by Filter: 2685
4. 4.417 4.417 ↑ 1.8 463 1

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

5. 0.117 1.104 ↓ 1.2 10 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
6. 0.987 0.987 ↓ 1.2 10 1

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

7.          

SubPlan (forHash Join)

8. 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.014..0.121 rows=12 loops=171)

  • Index Cond: (client_view_id = uv.id)
9. 5.985 10.431 ↑ 1.0 1 171

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

10. 4.446 4.446 ↑ 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.026 rows=1 loops=171)

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