explain.depesz.com

A tool for finding a real cause for slow queries.

Result: Wo7 : nakon clustera

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 278.174 3,767.821 ↓ 1.2 98 1

GroupAggregate (cost=100,223,350.66..100,223,363.86 rows=80 width=112) (actual time=3,496.689..3,767.821 rows=98 loops=1)

2. 33.501 3,489.647 ↓ 225.4 18,033 1

Sort (cost=100,223,350.66..100,223,350.86 rows=80 width=112) (actual time=3,480.639..3,489.647 rows=18,033 loops=1)

  • Sort Key: ((date_part('epoch'::text, date_trunc('hour'::text, ('1970-01-01 01:00:00+01'::timestamp with time zone + ((gps_data."timestamp")::double precision * '00:00:01'::interval)))) * 1000::double precision))
  • Sort Method: external merge Disk: 1128kB
3. 114.078 3,456.146 ↓ 225.4 18,033 1

Hash Join (cost=100,216,488.52..100,223,348.14 rows=80 width=112) (actual time=3,305.942..3,456.146 rows=18,033 loops=1)

  • Hash Cond: (gps_fms_data.gps_data_id = gps_data.id)
4. 139.516 139.516 ↑ 1.0 159,155 1

Seq Scan on gps_fms_data (cost=100,000,000.00..100,003,242.86 rows=159,286 width=12) (actual time=3.344..139.516 rows=159,155 loops=1)

5. 11.409 3,202.552 ↑ 2.2 18,045 1

Hash (cost=215,323.41..215,323.41 rows=40,009 width=108) (actual time=3,202.552..3,202.552 rows=18,045 loops=1)

6. 2,157.776 3,191.143 ↑ 2.2 18,045 1

Bitmap Heap Scan on gps_data (cost=77,956.14..215,323.41 rows=40,009 width=108) (actual time=1,041.980..3,191.143 rows=18,045 loops=1)

  • Recheck Cond: ((g_device_id = 605) AND ("timestamp" >= 1333231200) AND ("timestamp" <= 1334008740))
7. 37.900 1,033.367 ↓ 0.0 0 1

BitmapAnd (cost=77,956.14..77,956.14 rows=40,009 width=0) (actual time=1,033.367..1,033.367 rows=0 loops=1)

8. 295.804 295.804 ↓ 1.0 1,209,938 1

Bitmap Index Scan on device_id_index_gps_data (cost=0.00..22,358.56 rows=1,207,135 width=0) (actual time=295.804..295.804 rows=1,209,938 loops=1)

  • Index Cond: (g_device_id = 605)
9. 699.663 699.663 ↓ 1.0 2,691,326 1

Bitmap Index Scan on gps_data_timestamp_indx (cost=0.00..55,577.32 rows=2,648,430 width=0) (actual time=699.663..699.663 rows=2,691,326 loops=1)

  • Index Cond: (("timestamp" >= 1333231200) AND ("timestamp" <= 1334008740))