explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ee6n

Settings
# exclusive inclusive rows x rows loops node
1. 276.261 3,867.677 ↓ 17,745.7 283,931 1

Nested Loop Left Join (cost=13.50..198.35 rows=16 width=14) (actual time=0.550..3,867.677 rows=283,931 loops=1)

2. 960.288 2,478.224 ↓ 17,393.6 278,298 1

Nested Loop Left Join (cost=13.22..65.31 rows=16 width=32) (actual time=0.541..2,478.224 rows=278,298 loops=1)

  • Join Filter: (u.userid = su.userid)
  • Rows Removed by Join Filter: 2994010
3. 125.439 126.676 ↓ 17,390.8 278,252 1

Hash Join (cost=12.94..47.23 rows=16 width=13) (actual time=0.534..126.676 rows=278,252 loops=1)

  • Hash Cond: ((c.calendar)::text = (COALESCE(u.calendar, 'Default'::character varying))::text)
4. 0.717 0.717 ↑ 1.0 1,610 1

Seq Scan on calendar c (cost=0.00..28.10 rows=1,610 width=18) (actual time=0.009..0.717 rows=1,610 loops=1)

5. 0.280 0.520 ↓ 191.0 382 1

Hash (cost=12.91..12.91 rows=2 width=17) (actual time=0.520..0.520 rows=382 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 24kB
6. 0.240 0.240 ↓ 191.0 382 1

Seq Scan on users u (cost=0.00..12.91 rows=2 width=17) (actual time=0.006..0.240 rows=382 loops=1)

  • Filter: (COALESCE((disabled)::integer, 0) = 0)
  • Rows Removed by Filter: 12
7. 1,391.260 1,391.260 ↑ 1.4 11 278,252

Index Scan using scheduleuser_regday on scheduleuser su (cost=0.28..0.94 rows=15 width=32) (actual time=0.002..0.005 rows=11 loops=278,252)

  • Index Cond: (c.regday = regday)
8. 1,113.192 1,113.192 ↓ 0.0 0 278,298

Index Only Scan using attendencelog_pkey on attendencelog al (cost=0.29..8.30 rows=1 width=21) (actual time=0.004..0.004 rows=0 loops=278,298)

  • Index Cond: ((userid = u.userid) AND (regday = c.regday))
  • Heap Fetches: 11185