explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bC22 : Optimization for: ##wt; plan #jAyj

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.021 322,869.515 ↑ 1.0 18 1

Limit (cost=305.92..7,774.86 rows=18 width=942) (actual time=250,108.616..322,869.515 rows=18 loops=1)

2. 178,728.063 322,869.494 ↑ 150,340.2 18 1

Nested Loop Semi Join (cost=305.92..1,122,883,509.17 rows=2,706,124 width=942) (actual time=250,108.614..322,869.494 rows=18 loops=1)

  • Join Filter: (system_looks.id = (moderator_stats.target)::integer)
  • Rows Removed by Join Filter: 223714974
3. 507.542 507.542 ↑ 486.0 11,137 1

Index Scan using pk_system_looks on system_looks (cost=0.43..678,786.83 rows=5,412,247 width=942) (actual time=426.706..507.542 rows=11,137 loops=1)

  • Filter: ((task_id)::text ~~ '%lamoda%'::text)
  • Rows Removed by Filter: 499487
4. 143,611.191 143,633.889 ↓ 1.9 20,088 11,137

Materialize (cost=305.48..29,455.28 rows=10,367 width=7) (actual time=0.001..12.897 rows=20,088 loops=11,137)

5. 20.548 22.698 ↓ 1.9 20,111 1

Bitmap Heap Scan on moderator_stats (cost=305.48..29,403.44 rows=10,367 width=7) (actual time=2.380..22.698 rows=20,111 loops=1)

  • Recheck Cond: (user_id = 11112)
  • Filter: ((type)::text = 'Accept_Look'::text)
  • Rows Removed by Filter: 3867
  • Heap Blocks: exact=1499
6. 2.150 2.150 ↓ 1.8 23,978 1

Bitmap Index Scan on ix_moderator_stats_user_id (cost=0.00..302.89 rows=13,128 width=0) (actual time=2.150..2.150 rows=23,978 loops=1)

  • Index Cond: (user_id = 11112)
Planning time : 0.414 ms
Execution time : 322,869.777 ms