explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8daJ

Settings
# exclusive inclusive rows x rows loops node
1. 20.151 221.017 ↑ 1.0 1 1

Aggregate (cost=14,158.61..14,158.62 rows=1 width=8) (actual time=221.016..221.017 rows=1 loops=1)

2. 85.193 200.866 ↓ 1.0 252,165 1

Merge Right Join (cost=0.71..13,534.65 rows=249,585 width=8) (actual time=0.021..200.866 rows=252,165 loops=1)

  • Merge Cond: (legalholds2_.legalholds_id = legalhold0_.id)
  • Filter: ((NOT legalhold0_.confidential) OR ((person1_.person_user_name)::text = 'admin16'::text) OR ((legalhold0_.created_by)::text = 'admin16'::text))
3. 0.000 0.004 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.29..357.35 rows=1,850 width=524) (actual time=0.004..0.004 rows=0 loops=1)

4. 0.004 0.004 ↓ 0.0 0 1

Index Only Scan using legalhold_personlegalhold_pkey on legalhold_personlegalhold legalholds2_ (cost=0.15..40.00 rows=1,850 width=16) (actual time=0.004..0.004 rows=0 loops=1)

  • Heap Fetches: 0
5. 0.000 0.000 ↓ 0.0 0

Index Scan using person_id_first_name_last_name_unique on person_details person1_ (cost=0.14..0.16 rows=1 width=524) (never executed)

  • Index Cond: (person_id = legalholds2_.personlegalholds_id)
6. 115.669 115.669 ↓ 1.0 252,165 1

Index Scan using pk_legalhold on legalhold legalhold0_ (cost=0.42..12,520.96 rows=249,585 width=17) (actual time=0.014..115.669 rows=252,165 loops=1)

Planning time : 0.281 ms
Execution time : 221.075 ms