explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AU4d : Optimization for: Character; plan #ixny

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 132.881 660.896 ↑ 1.1 35,763 1

Hash Join (cost=61,363.60..100,588.60 rows=37,932 width=256) (actual time=127.903..660.896 rows=35,763 loops=1)

  • Hash Cond: (m0_.user_id = m1_.id)
2. 447.734 447.734 ↑ 1.0 925,455 1

Seq Scan on md_character m0_ (cost=0.00..35,459.46 rows=928,639 width=256) (actual time=0.011..447.734 rows=925,455 loops=1)

  • Filter: (type = ANY ('{customer,guest}'::charactertypeenum[]))
  • Rows Removed by Filter: 102169
3. 7.877 80.281 ↓ 1.2 37,840 1

Hash (cost=60,970.49..60,970.49 rows=31,449 width=4) (actual time=80.281..80.281 rows=37,840 loops=1)

  • Buckets: 65536 (originally 32768) Batches: 1 (originally 1) Memory Usage: 1843kB
4. 63.459 72.404 ↓ 1.2 37,840 1

Bitmap Heap Scan on md_user m1_ (cost=674.79..60,970.49 rows=31,449 width=4) (actual time=10.725..72.404 rows=37,840 loops=1)

  • Recheck Cond: ((updatedat >= (now() - '10 days'::interval)) AND (updatedat <= (now() + '10 days'::interval)))
  • Heap Blocks: exact=11763
5. 8.945 8.945 ↓ 1.2 38,173 1

Bitmap Index Scan on idx_user_updatedat (cost=0.00..666.92 rows=31,449 width=0) (actual time=8.944..8.945 rows=38,173 loops=1)

  • Index Cond: ((updatedat >= (now() - '10 days'::interval)) AND (updatedat <= (now() + '10 days'::interval)))
Planning time : 0.479 ms
Execution time : 663.591 ms