explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MiG1 : Optimization for: plan #MqGY

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 96.896 911.433 ↓ 1.3 33,769 1

Sort (cost=409,604.18..409,670.95 rows=26,711 width=1,318) (actual time=896.919..911.433 rows=33,769 loops=1)

  • Sort Key: s0_.id DESC, s0_.first_name, s0_.last_name
  • Sort Method: external merge Disk: 10,144kB
2. 30.548 814.537 ↓ 1.3 33,769 1

Nested Loop Left Join (cost=328.24..392,299.73 rows=26,711 width=1,318) (actual time=14.916..814.537 rows=33,769 loops=1)

3. 20.750 480.068 ↓ 1.3 33,769 1

Nested Loop Left Join (cost=327.80..231,210.97 rows=26,706 width=1,096) (actual time=14.897..480.068 rows=33,769 loops=1)

4. 27.785 189.166 ↓ 1.3 33,769 1

Hash Left Join (cost=327.37..92,830.21 rows=26,706 width=1,089) (actual time=14.873..189.166 rows=33,769 loops=1)

  • Hash Cond: (s0_.id = o2_.user_id)
5. 152.529 160.768 ↓ 1.3 33,769 1

Bitmap Heap Scan on sdz_user s0_ (cost=274.97..92,677.57 rows=26,706 width=553) (actual time=14.247..160.768 rows=33,769 loops=1)

  • Recheck Cond: (to_tsvector('simple'::regconfig, (((((((COALESCE(first_name, ''::character varying))::text || ' '::text) || (COALESCE(last_name, ''::character varying))::text) || ' '::text) || (email)::text) || ' '::text) || (username)::text)) @@ '''nicolas'''::tsquery)
  • Heap Blocks: exact=30,776
6. 8.239 8.239 ↓ 1.3 33,771 1

Bitmap Index Scan on test_112 (cost=0.00..268.29 rows=26,706 width=0) (actual time=8.239..8.239 rows=33,771 loops=1)

  • Index Cond: (to_tsvector('simple'::regconfig, (((((((COALESCE(first_name, ''::character varying))::text || ' '::text) || (COALESCE(last_name, ''::character varying))::text) || ' '::text) || (email)::text) || ' '::text) || (username)::text)) @@ '''nicolas'''::tsquery)
7. 0.368 0.613 ↑ 1.0 1,840 1

Hash (cost=29.40..29.40 rows=1,840 width=540) (actual time=0.613..0.613 rows=1,840 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 105kB
8. 0.245 0.245 ↑ 1.0 1,840 1

Seq Scan on oc_mentor_mentorship_periods o2_ (cost=0.00..29.40 rows=1,840 width=540) (actual time=0.014..0.245 rows=1,840 loops=1)

9. 270.152 270.152 ↑ 1.0 1 33,769

Index Scan using uniq_fb6cacb1a76ed395 on sdz_user_option s3_ (cost=0.43..5.17 rows=1 width=11) (actual time=0.008..0.008 rows=1 loops=33,769)

  • Index Cond: (s0_.id = user_id)
10. 303.921 303.921 ↑ 1.0 1 33,769

Index Scan using oc_user_security_credentials_pkey on oc_user_security_credentials o1_ (cost=0.43..6.02 rows=1 width=222) (actual time=0.009..0.009 rows=1 loops=33,769)

  • Index Cond: (s0_.id = user_id)
Planning time : 1.161 ms
Execution time : 915.962 ms