explain.depesz.com

A tool for finding a real cause for slow queries.

Result: rFY : nakon dump-restore

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.102 6,059.600 ↓ 98.0 98 1

Sort (cost=100,059,579.93..100,059,579.94 rows=1 width=112) (actual time=6,059.592..6,059.600 rows=98 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: quicksort Memory: 38kB
2. 764.607 6,059.498 ↓ 98.0 98 1

HashAggregate (cost=100,059,579.78..100,059,579.92 rows=1 width=112) (actual time=6,059.090..6,059.498 rows=98 loops=1)

3. 1,358.463 5,294.891 ↓ 2,003.7 18,033 1

Hash Join (cost=100,055,882.59..100,059,579.62 rows=9 width=112) (actual time=3,953.795..5,294.891 rows=18,033 loops=1)

  • Hash Cond: (gps_fms_data.gps_data_id = gps_data.id)
4. 32.609 32.609 ↓ 1.0 122,078 1

Seq Scan on gps_fms_data (cost=100,000,000.00..100,002,477.40 rows=121,940 width=12) (actual time=0.013..32.609 rows=122,078 loops=1)

5. 10.367 3,903.819 ↓ 2.9 18,045 1

Hash (cost=55,804.44..55,804.44 rows=6,252 width=108) (actual time=3,903.819..3,903.819 rows=18,045 loops=1)

6. 2,782.643 3,893.452 ↓ 2.9 18,045 1

Bitmap Heap Scan on gps_data (cost=32,013.03..55,804.44 rows=6,252 width=108) (actual time=1,122.572..3,893.452 rows=18,045 loops=1)

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

BitmapAnd (cost=32,013.03..32,013.03 rows=6,252 width=0) (actual time=1,110.809..1,110.809 rows=0 loops=1)

8. 729.896 729.896 ↓ 6.7 2,691,454 1

Bitmap Index Scan on gps_data_timestamp_indx (cost=0.00..8,566.25 rows=402,494 width=0) (actual time=729.896..729.896 rows=2,691,454 loops=1)

  • Index Cond: (("timestamp" >= 1333231200) AND ("timestamp" <= 1334008740))
9. 375.126 375.126 ↑ 1.1 1,179,284 1

Bitmap Index Scan on device_id_index_gps_data (cost=0.00..23,443.41 rows=1,250,415 width=0) (actual time=375.126..375.126 rows=1,179,284 loops=1)

  • Index Cond: (g_device_id = 605)