explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Pon0

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=11,239,184.08..11,241,645.34 rows=46,881 width=22) (actual rows= loops=)

  • Group Key: (date_trunc('hour'::text, to_timestamp((cities_unrestricted_points_yesterday."timestamp")::double precision))), cities_unrestricted_points_yesterday.edge_id, ((cities_unrestricted_points_yesterday.speed = 0)), (div((cities_unrestricted_points_yesterday.speed)::numeric, '5'::numeric))
2. 0.000 0.000 ↓ 0.0

Sort (cost=11,239,184.08..11,239,301.29 rows=46,881 width=22) (actual rows= loops=)

  • Sort Key: (date_trunc('hour'::text, to_timestamp((cities_unrestricted_points_yesterday."timestamp")::double precision))), cities_unrestricted_points_yesterday.edge_id, ((cities_unrestricted_points_yesterday.speed = 0)), (div((cities_unrestricted_points_yesterday.speed)::numeric, '5'::numeric))
3. 0.000 0.000 ↓ 0.0

Hash Join (cost=10,704,216.73..11,235,546.89 rows=46,881 width=22) (actual rows= loops=)

  • Hash Cond: (cities_unrestricted_points_yesterday.edge_id = graph_edges.edge_id)
4. 0.000 0.000 ↓ 0.0

Unique (cost=10,579,795.20..11,071,332.54 rows=2,808,785 width=33) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Sort (cost=10,579,795.20..10,650,014.82 rows=28,087,848 width=33) (actual rows= loops=)

  • Sort Key: cities_unrestricted_points_yesterday."timestamp", cities_unrestricted_points_yesterday.edge_id, cities_unrestricted_points_yesterday.device_id, cities_unrestricted_points_yesterday.speed, cities_unrestricted_points_yesterday.ppc
6. 0.000 0.000 ↓ 0.0

Seq Scan on cities_unrestricted_points_yesterday (cost=0.00..4,800,756.40 rows=28,087,848 width=33) (actual rows= loops=)

  • Filter: ((city)::text = 'almaty'::text)
7. 0.000 0.000 ↓ 0.0

Hash (cost=123,607.38..123,607.38 rows=65,132 width=8) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on graph_edges (cost=3,943.76..123,607.38 rows=65,132 width=8) (actual rows= loops=)

  • Recheck Cond: ((city)::text = 'almaty'::text)
  • Filter: ((road_class > 1) AND (road_class < 8))
  • -> Bitmap Index Scan on city_graph_edges (cost=0.00..3927.48 rows=207340 width=0)" Index Cond: ((city)::text = 'almaty'::text)