explain.depesz.com

PostgreSQL's explain analyze made readable

Result: B3Lr

Settings
# exclusive inclusive rows x rows loops node
1. 16,238.897 30,816.527 ↑ 2.1 18 1

Nested Loop Semi Join (cost=11.32..46,431.83 rows=37 width=21) (actual time=940.703..30,816.527 rows=18 loops=1)

  • Join Filter: ((((row_permission.object_id)::text = (company_relationship.id)::text) AND ((row_permission.object_type)::text = 'company_relationship'::text)
  • Rows Removed by Join Filter: 4036561
2. 3.480 3.480 ↑ 1.0 466 1

Seq Scan on company_relationship (cost=0.00..30.84 rows=466 width=21) (actual time=0.021..3.480 rows=466 loops=1)

  • Filter: (NOT is_deleted)
  • Rows Removed by Filter: 318
3. 14,364.275 14,574.150 ↓ 2.6 8,662 466

Materialize (cost=11.32..3,889.11 rows=3,318 width=90) (actual time=0.005..31.275 rows=8,662 loops=466)

4. 202.684 209.875 ↓ 2.7 8,916 1

Nested Loop Left Join (cost=11.32..3,872.52 rows=3,318 width=90) (actual time=0.198..209.875 rows=8,916 loops=1)

  • -> Index Only Scan using object_permission_pkey on object_permission (cost=0.41..9.83 rows=21 width=60) (actual time=0.021..0.321 rows=29 loo
5. 7.075 7.191 ↑ 1.1 297 1

Bitmap Heap Scan on row_permission (cost=10.90..648.22 rows=321 width=30) (actual time=0.159..7.191 rows=297 loops=1)

  • Recheck Cond: ((actor_id)::text = 'U88KaxczQzg6h2esUF3DjA'::text)
  • Filter: (NOT is_deleted)
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=201
  • Index Cond: (source_object_id = (row_permission.object_id)::text)
  • Heap Fetches: 8654
6. 0.116 0.116 ↑ 1.1 298 1

Bitmap Index Scan on row_permission_actor_id_idx (cost=0.00..10.82 rows=321 width=0) (actual time=0.116..0.116 rows=298 loops=1)

  • Index Cond: ((actor_id)::text = 'U88KaxczQzg6h2esUF3DjA'::text)