explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0T57

Settings
# exclusive inclusive rows x rows loops node
1. 14.692 6,367.082 ↑ 251.2 898 1

Hash Left Join (cost=82,848.02..1,503,650.16 rows=225,622 width=84) (actual time=1,865.570..6,367.082 rows=898 loops=1)

  • Output: accounts_bcdcompanyprofile.smid, accounts_bcdcompanyprofile.date_updated, accounts_bcdcompanyprofile.tspm_entity_id, accounts_bcdcompanyprofile.obt_client_id, accounts_bcdcompanyprofile.id, accounts_bcdcompanyprofile.is_folder, accounts_bcdcompanyprofile.parent_id, accounts_bcdcompanyprofile.title, accounts_user.email
  • Hash Cond: (accounts_bcduser.user_ptr_id = accounts_user.id)
  • Buffers: shared hit=406644 read=1004630, temp read=773 written=765
2. 9.153 6,206.554 ↑ 251.2 898 1

Hash Left Join (cost=68,542.28..1,480,579.12 rows=225,622 width=61) (actual time=1,265.367..6,206.554 rows=898 loops=1)

  • Output: accounts_bcdcompanyprofile.smid, accounts_bcdcompanyprofile.date_updated, accounts_bcdcompanyprofile.tspm_entity_id, accounts_bcdcompanyprofile.obt_client_id, accounts_bcdcompanyprofile.id, accounts_bcdcompanyprofile.is_folder, accounts_bcdcompanyprofile.parent_id, accounts_bcdcompanyprofile.title, accounts_bcduser.user_ptr_id
  • Hash Cond: (accounts_bcdcompanyprofile.updated_by_id = accounts_bcduser.user_ptr_id)
  • Buffers: shared hit=395834 read=1004630, temp read=178 written=176
3. 6,102.220 6,106.273 ↑ 251.2 898 1

Seq Scan on public.accounts_bcdcompanyprofile (cost=64,207.52..1,467,828.06 rows=225,622 width=61) (actual time=1,173.687..6,106.273 rows=898 loops=1)

  • Output: accounts_bcdcompanyprofile.smid, accounts_bcdcompanyprofile.date_updated, accounts_bcdcompanyprofile.tspm_entity_id, accounts_bcdcompanyprofile.obt_client_id, accounts_bcdcompanyprofile.id, accounts_bcdcompanyprofile.is_folder, accounts_bcdcompanyprofile.parent_id, accounts_bcdcompanyprofile.title, accounts_bcdcompanyprofile.updated_by_id
  • Filter: ((hashed SubPlan 1) OR (accounts_bcdcompanyprofile.parent_id IS NULL))
  • Rows Removed by Filter: 41991
  • Buffers: shared hit=394644 read=1004630
4.          

SubPlan (forSeq Scan)

5. 3.796 4.053 ↑ 2,397.7 7 1

Bitmap Heap Scan on public.accounts_bcdcompanyprofile u0 (cost=251.57..64,165.56 rows=16,784 width=4) (actual time=0.484..4.053 rows=7 loops=1)

  • Output: u0.id
  • Recheck Cond: (u0.lft <= 2841)
  • Filter: ((u0.rght >= 2842) AND (u0.tree_id = 1))
  • Rows Removed by Filter: 1417
  • Heap Blocks: exact=1283
  • Buffers: shared hit=1294
6. 0.257 0.257 ↑ 12.3 1,424 1

Bitmap Index Scan on accounts_bcdcompanyprofile_lft (cost=0.00..247.37 rows=17,460 width=0) (actual time=0.257..0.257 rows=1,424 loops=1)

  • Index Cond: (u0.lft <= 2841)
  • Buffers: shared hit=11
7. 47.771 91.128 ↓ 1.0 119,144 1

Hash (cost=2,380.56..2,380.56 rows=119,056 width=4) (actual time=91.128..91.128 rows=119,144 loops=1)

  • Output: accounts_bcduser.user_ptr_id
  • Buckets: 131072 Batches: 2 Memory Usage: 3121kB
  • Buffers: shared hit=1190, temp written=174
8. 43.357 43.357 ↓ 1.0 119,144 1

Seq Scan on public.accounts_bcduser (cost=0.00..2,380.56 rows=119,056 width=4) (actual time=0.012..43.357 rows=119,144 loops=1)

  • Output: accounts_bcduser.user_ptr_id
  • Buffers: shared hit=1190
9. 68.269 145.836 ↑ 1.0 119,144 1

Hash (cost=12,001.44..12,001.44 rows=119,144 width=31) (actual time=145.836..145.836 rows=119,144 loops=1)

  • Output: accounts_user.email, accounts_user.id
  • Buckets: 65536 Batches: 4 Memory Usage: 2412kB
  • Buffers: shared hit=10810, temp written=576
10. 77.567 77.567 ↑ 1.0 119,144 1

Seq Scan on public.accounts_user (cost=0.00..12,001.44 rows=119,144 width=31) (actual time=0.002..77.567 rows=119,144 loops=1)

  • Output: accounts_user.email, accounts_user.id
  • Buffers: shared hit=10810