explain.depesz.com

PostgreSQL's explain analyze made readable

Result: etWs

Settings
# exclusive inclusive rows x rows loops node
1. 88.669 3,363.522 ↓ 0.0 0 1

Insert on tmp_src_data (cost=219,580.65..231,435.47 rows=789,135 width=24) (actual time=3,363.522..3,363.522 rows=0 loops=1)

2. 27.313 3,274.853 ↑ 8.9 88,622 1

Merge Join (cost=219,580.65..231,435.47 rows=789,135 width=24) (actual time=3,218.812..3,274.853 rows=88,622 loops=1)

  • Merge Cond: (d.device_id = device_data_cache_0.device_id)
3. 3.033 4.620 ↑ 1.1 3,110 1

Sort (cost=260.36..269.29 rows=3,570 width=4) (actual time=3.883..4.620 rows=3,110 loops=1)

  • Sort Key: d.device_id
  • Sort Method: quicksort Memory: 242kB
4. 1.587 1.587 ↑ 1.1 3,110 1

Seq Scan on tmp_device_list d (cost=0.00..49.70 rows=3,570 width=4) (actual time=0.322..1.587 rows=3,110 loops=1)

5. 193.578 3,242.920 ↓ 2.0 88,622 1

Sort (cost=219,320.29..219,430.81 rows=44,209 width=24) (actual time=3,214.918..3,242.920 rows=88,622 loops=1)

  • Sort Key: device_data_cache_0.device_id
  • Sort Method: external sort Disk: 3640kB
6. 157.713 3,049.342 ↓ 2.0 88,622 1

Merge Join (cost=205,988.72..215,909.11 rows=44,209 width=24) (actual time=2,945.074..3,049.342 rows=88,622 loops=1)

  • Merge Cond: ((device_data_cache_0.type_id = tk.type_id) AND (device_data_cache_0.nr = tk.nr))
7. 2,115.999 2,884.187 ↑ 1.9 654,589 1

Sort (cost=205,888.08..208,936.99 rows=1,219,565 width=32) (actual time=2,564.374..2,884.187 rows=654,589 loops=1)

  • Sort Key: device_data_cache_0.type_id, device_data_cache_0.nr
  • Sort Method: external merge Disk: 55040kB
8. 160.785 768.188 ↓ 1.0 1,225,215 1

Append (cost=0.00..24,243.65 rows=1,219,565 width=32) (actual time=2.919..768.188 rows=1,225,215 loops=1)

9. 102.671 102.671 ↓ 1.1 77,152 1

Seq Scan on device_data_cache_0 (cost=0.00..1,883.00 rows=71,900 width=32) (actual time=2.917..102.671 rows=77,152 loops=1)

10. 504.673 504.673 ↓ 1.0 1,148,063 1

Seq Scan on device_data_cache_1 (cost=0.00..22,313.45 rows=1,144,945 width=32) (actual time=0.151..504.673 rows=1,148,063 loops=1)

11. 0.044 0.044 ↓ 0.0 0 1

Seq Scan on device_data_cache_2 (cost=0.00..23.60 rows=1,360 width=32) (actual time=0.044..0.044 rows=0 loops=1)

12. 0.015 0.015 ↓ 0.0 0 1

Seq Scan on device_data_cache (cost=0.00..23.60 rows=1,360 width=32) (actual time=0.015..0.015 rows=0 loops=1)

13. 7.356 7.442 ↑ 1,450.0 1 1

Sort (cost=100.64..104.26 rows=1,450 width=8) (actual time=0.116..7.442 rows=1 loops=1)

  • Sort Key: tk.type_id, tk.nr
  • Sort Method: quicksort Memory: 25kB
14. 0.086 0.086 ↑ 1,450.0 1 1

Seq Scan on tmp_task_row tk (cost=0.00..24.50 rows=1,450 width=8) (actual time=0.085..0.086 rows=1 loops=1)

Planning time : 7.619 ms
Execution time : 3,381.652 ms