explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TGbO

Settings
# exclusive inclusive rows x rows loops node
1. 0.021 325,287.747 ↑ 1.0 18 1

Limit (cost=306.49..7,818.66 rows=18 width=942) (actual time=252,156.570..325,287.747 rows=18 loops=1)

2. 178,911.021 325,287.726 ↑ 150,340.2 18 1

Nested Loop Semi Join (cost=306.49..1,129,381,321.00 rows=2,706,124 width=942) (actual time=252,156.568..325,287.726 rows=18 loops=1)

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

Index Scan using pk_system_looks on system_looks (cost=0.43..681,790.83 rows=5,412,247 width=942) (actual time=531.857..816.115 rows=11,137 loops=1)

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

Materialize (cost=306.06..29,566.85 rows=10,427 width=7) (actual time=0.042..13.070 rows=20,088 loops=11,137)

5. 1,343.890 1,796.420 ↓ 1.9 20,111 1

Bitmap Heap Scan on moderator_stats (cost=306.06..29,514.72 rows=10,427 width=7) (actual time=459.928..1,796.420 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. 452.530 452.530 ↓ 1.8 23,978 1

Bitmap Index Scan on ix_moderator_stats_user_id (cost=0.00..303.45 rows=13,203 width=0) (actual time=452.530..452.530 rows=23,978 loops=1)

  • Index Cond: (user_id = 11112)
Planning time : 0.386 ms
Execution time : 325,288.021 ms