explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YilQ

Settings
# exclusive inclusive rows x rows loops node
1. 1,091.062 2,964.172 ↓ 1.6 2,220,713 1

Hash Join (cost=1,227.35..76,790.53 rows=1,410,107 width=8) (actual time=11.419..2,964.172 rows=2,220,713 loops=1)

  • Hash Cond: (t.user_id = users.id)
2. 1,253.441 1,872.957 ↓ 1.4 2,220,713 1

Hash Join (cost=1,208.36..56,695.45 rows=1,593,341 width=8) (actual time=11.259..1,872.957 rows=2,220,713 loops=1)

  • Hash Cond: (t.device_id = devices.id)
3. 608.309 608.309 ↓ 1.0 2,220,713 1

Seq Scan on tmp_user_device t (cost=0.00..31,446.40 rows=2,161,940 width=8) (actual time=0.028..608.309 rows=2,220,713 loops=1)

4. 4.300 11.207 ↑ 1.0 14,608 1

Hash (cost=1,025.76..1,025.76 rows=14,608 width=4) (actual time=11.207..11.207 rows=14,608 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 642kB
5. 6.907 6.907 ↑ 1.0 14,608 1

Seq Scan on devices (cost=0.00..1,025.76 rows=14,608 width=4) (actual time=0.008..6.907 rows=14,608 loops=1)

  • Filter: (activation_status < 9999)
  • Rows Removed by Filter: 5213
6. 0.055 0.153 ↑ 1.0 177 1

Hash (cost=16.77..16.77 rows=177 width=4) (actual time=0.153..0.153 rows=177 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
7. 0.098 0.098 ↑ 1.0 177 1

Seq Scan on users (cost=0.00..16.77 rows=177 width=4) (actual time=0.008..0.098 rows=177 loops=1)

  • Filter: (is_active AND is_admin)