explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sAFk

Settings
# exclusive inclusive rows x rows loops node
1. 29.067 3,069.160 ↑ 4.2 48 1

GroupAggregate (cost=598,615.42..598,796.36 rows=200 width=24) (actual time=3,030.011..3,069.160 rows=48 loops=1)

  • Group Key: s.sample_hour
2. 60.088 3,040.093 ↓ 22.3 194,880 1

Sort (cost=598,615.42..598,637.22 rows=8,722 width=32) (actual time=3,029.207..3,040.093 rows=194,880 loops=1)

  • Sort Key: s.sample_hour
  • Sort Method: quicksort Memory: 16,702kB
3. 14.183 2,980.005 ↓ 22.3 194,880 1

Nested Loop Left Join (cost=2.82..598,044.54 rows=8,722 width=32) (actual time=32.316..2,980.005 rows=194,880 loops=1)

4. 15.418 2,576.062 ↓ 22.3 194,880 1

Nested Loop Left Join (cost=2.26..525,071.98 rows=8,722 width=36) (actual time=32.292..2,576.062 rows=194,880 loops=1)

5. 19.702 2,170.884 ↓ 22.3 194,880 1

Nested Loop Left Join (cost=1.69..452,367.41 rows=8,722 width=32) (actual time=32.268..2,170.884 rows=194,880 loops=1)

6. 38.620 1,761.422 ↓ 22.3 194,880 1

Nested Loop Left Join (cost=1.13..379,394.85 rows=8,722 width=28) (actual time=32.256..1,761.422 rows=194,880 loops=1)

7. 31.744 1,333.042 ↓ 22.3 194,880 1

Nested Loop Left Join (cost=0.56..306,378.28 rows=8,722 width=24) (actual time=32.238..1,333.042 rows=194,880 loops=1)

8. 31.492 911.538 ↓ 22.3 194,880 1

Nested Loop Left Join (cost=0.00..233,405.72 rows=8,722 width=20) (actual time=32.206..911.538 rows=194,880 loops=1)

9. 20.359 100.526 ↓ 22.3 194,880 1

Append (cost=0.00..165,209.08 rows=8,722 width=16) (actual time=32.130..100.526 rows=194,880 loops=1)

  • Subplans Removed: 2
10. 48.434 80.167 ↓ 61.3 194,880 1

Bitmap Heap Scan on sample_2019_09_alvjcabb00t s (cost=18,969.95..28,169.10 rows=3,178 width=16) (actual time=32.129..80.167 rows=194,880 loops=1)

  • Recheck Cond: ((sample_hour >= (now() - '7 days'::interval)) AND ((switch_name)::text = 'ALVJCABB00T'::text))
  • Heap Blocks: exact=3,102
11. 31.733 31.733 ↓ 61.3 194,880 1

Bitmap Index Scan on sample_time_switch_idx (cost=0.00..18,969.15 rows=3,178 width=0) (actual time=31.733..31.733 rows=194,880 loops=1)

  • Index Cond: ((sample_hour >= (now() - '7 days'::interval)) AND ((switch_name)::text = 'ALVJCABB00T'::text))
12. 779.520 779.520 ↓ 0.0 0 194,880

Index Scan using idx_reg_tru_hash on reg_tru tru (cost=0.00..7.82 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=194,880)

  • Index Cond: (s.id = sample_id)
  • Rows Removed by Index Recheck: 0
13. 389.760 389.760 ↓ 0.0 0 194,880

Index Scan using reg_tru2_pkey on reg_tru2 tru2 (cost=0.56..8.37 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=194,880)

  • Index Cond: (s.id = sample_id)
14. 389.760 389.760 ↓ 0.0 0 194,880

Index Scan using reg_incatot_pkey on reg_incatot incatot (cost=0.56..8.37 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=194,880)

  • Index Cond: (s.id = sample_id)
15. 389.760 389.760 ↓ 0.0 0 194,880

Index Scan using reg_incatot2_pkey on reg_incatot2 incatot2 (cost=0.56..8.37 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=194,880)

  • Index Cond: (s.id = sample_id)
16. 389.760 389.760 ↓ 0.0 0 194,880

Index Scan using reg_connect_pkey on reg_connect connect (cost=0.56..8.34 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=194,880)

  • Index Cond: (s.id = sample_id)
17. 389.760 389.760 ↓ 0.0 0 194,880

Index Scan using reg_connect2_pkey on reg_connect2 connect2 (cost=0.56..8.37 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=194,880)

  • Index Cond: (s.id = sample_id)
Planning time : 13.089 ms
Execution time : 3,070.516 ms