explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vp6y

Settings
# exclusive inclusive rows x rows loops node
1. 352.392 352.392 ↑ 32.3 26,533 1

CTE Scan on users_dupes (cost=34,898.51..52,042.37 rows=857,193 width=138) (actual time=3.070..352.392 rows=26,533 loops=1)

2.          

CTE users_dupes

3. 1.011 346.195 ↑ 32.3 26,533 1

Append (cost=353.11..34,898.51 rows=857,193 width=25) (actual time=3.067..346.195 rows=26,533 loops=1)

4. 48.524 61.056 ↑ 1.8 26,512 1

Hash Join (cost=353.11..3,484.86 rows=48,718 width=25) (actual time=3.066..61.056 rows=26,512 loops=1)

  • Hash Cond: (lower((d.username)::text) = lower((u.username)::text))
5. 9.506 9.506 ↓ 1.0 49,990 1

Index Scan using raw_data_pkey on raw_data d (cost=0.43..2,340.51 rows=48,718 width=17) (actual time=0.019..9.506 rows=49,990 loops=1)

  • Index Cond: ((id >= 1) AND (id <= 50000))
6. 2.091 3.026 ↑ 1.0 3,314 1

Hash (cost=311.19..311.19 rows=3,319 width=18) (actual time=3.026..3.026 rows=3,314 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 197kB
7. 0.935 0.935 ↑ 1.0 3,319 1

Seq Scan on users u (cost=0.00..311.19 rows=3,319 width=18) (actual time=0.019..0.935 rows=3,319 loops=1)

8. 14.255 284.128 ↑ 38,498.8 21 1

Merge Join (cost=6,639.03..22,841.72 rows=808,475 width=25) (actual time=266.261..284.128 rows=21 loops=1)

  • Merge Cond: ((lower((u_1.email)::text)) = (lower((d_1.username)::text)))
9. 4.115 6.166 ↑ 2.4 1,355 1

Sort (cost=505.29..513.59 rows=3,319 width=37) (actual time=5.995..6.166 rows=1,355 loops=1)

  • Sort Key: (lower((u_1.email)::text))
  • Sort Method: quicksort Memory: 378kB
10. 2.051 2.051 ↑ 1.0 3,319 1

Seq Scan on users u_1 (cost=0.00..311.19 rows=3,319 width=37) (actual time=0.028..2.051 rows=3,319 loops=1)

11. 227.475 263.707 ↑ 1.0 48,016 1

Sort (cost=6,133.74..6,255.53 rows=48,718 width=17) (actual time=257.445..263.707 rows=48,016 loops=1)

  • Sort Key: (lower((d_1.username)::text))
  • Sort Method: external sort Disk: 2088kB
12. 36.232 36.232 ↓ 1.0 49,990 1

Index Scan using raw_data_pkey on raw_data d_1 (cost=0.43..2,340.51 rows=48,718 width=17) (actual time=0.020..36.232 rows=49,990 loops=1)

  • Index Cond: ((id >= 1) AND (id <= 50000))
Planning time : 0.513 ms
Execution time : 355.739 ms