explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sjUw

Settings
# exclusive inclusive rows x rows loops node
1. 894.617 7,683.756 ↑ 586.7 29,389 1

GroupAggregate (cost=2,461,929.53..4,056,742.75 rows=17,241,224 width=141) (actual time=6,742.730..7,683.756 rows=29,389 loops=1)

  • Group Key: a.pos_usr_id, c.cell_id, c.influence_radius, c.mean_x, c.mean_y, a.is_domestic
  • Filter: (count(DISTINCT date(a.pos_time)) > 1)
  • Rows Removed by Filter: 45904
2. 411.643 6,789.139 ↑ 23.7 726,319 1

Sort (cost=2,461,929.53..2,505,032.59 rows=17,241,224 width=73) (actual time=6,742.611..6,789.139 rows=726,319 loops=1)

  • Sort Key: a.pos_usr_id, c.cell_id, c.influence_radius, c.mean_x, c.mean_y, a.is_domestic
  • Sort Method: quicksort Memory: 117325kB
3. 4,107.211 6,377.496 ↑ 23.7 726,319 1

Merge Join (cost=0.72..389,589.68 rows=17,241,224 width=73) (actual time=1.984..6,377.496 rows=726,319 loops=1)

  • Merge Cond: (c.pos_usr_id = a.pos_usr_id)
  • Join Filter: (idx(c.cell_seen_arr, a.cell_id) <> 0)
  • Rows Removed by Join Filter: 28673982
4. 208.846 208.846 ↑ 1.0 75,293 1

Index Scan using test_anchor_test_pos_usr_id_idx on test_anchor_test c (cost=0.29..5,473.69 rows=75,293 width=92) (actual time=0.041..208.846 rows=75,293 loops=1)

5. 1,170.758 2,061.439 ↓ 40.5 29,400,301 1

Materialize (cost=0.42..39,186.29 rows=726,319 width=21) (actual time=0.055..2,061.439 rows=29,400,301 loops=1)

6. 890.681 890.681 ↑ 1.0 726,319 1

Index Scan using temp_anchor_data_test_pos_usr_id_idx on temp_anchor_data_test a (cost=0.42..37,370.50 rows=726,319 width=21) (actual time=0.052..890.681 rows=726,319 loops=1)