explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3tE7

Settings
# exclusive inclusive rows x rows loops node
1. 882.215 7,670.899 ↑ 719.6 29,389 1

GroupAggregate (cost=3,041,221.43..4,997,427.99 rows=21,148,179 width=114) (actual time=6,742.889..7,670.899 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. 422.011 6,788.684 ↑ 29.1 726,319 1

Sort (cost=3,041,221.43..3,094,091.88 rows=21,148,179 width=46) (actual time=6,742.784..6,788.684 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,094.008 6,366.673 ↑ 29.1 726,319 1

Merge Join (cost=0.72..468,119.31 rows=21,148,179 width=46) (actual time=1.940..6,366.673 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. 211.038 211.038 ↑ 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.66 rows=75,293 width=58) (actual time=0.019..211.038 rows=75,293 loops=1)

5. 1,167.269 2,061.627 ↓ 40.5 29,400,301 1

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

6. 894.358 894.358 ↑ 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.015..894.358 rows=726,319 loops=1)