explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mJJH

Settings
# exclusive inclusive rows x rows loops node
1. 367.302 11,364.592 ↑ 1.5 390,912 1

Sort (cost=2,041,547.05..2,042,980.58 rows=573,414 width=167) (actual time=11,308.893..11,364.592 rows=390,912 loops=1)

  • Sort Key: signal."timestamp
  • Sort Method: external sort Disk: 47040kB
2. 257.609 10,997.290 ↑ 1.5 390,912 1

GroupAggregate (cost=1,918,159.22..1,939,662.24 rows=573,414 width=167) (actual time=10,592.202..10,997.290 rows=390,912 loops=1)

  • Group Key: signal.signal_id, parameter.name, parameter.unit, source_type.name, source.name, source.serial, site.name, quality.method, quality.flag
3. 480.553 10,739.681 ↑ 1.5 390,912 1

Sort (cost=1,918,159.22..1,919,592.75 rows=573,414 width=167) (actual time=10,592.193..10,739.681 rows=390,912 loops=1)

  • Sort Key: signal.signal_id, parameter.name, parameter.unit, source_type.name, source.name, source.serial, site.name, quality.method, quality.flag
  • Sort Method: external merge Disk: 44592kB
4. 62.586 10,259.128 ↑ 1.5 390,912 1

Hash Left Join (cost=1,658,732.63..1,816,274.41 rows=573,414 width=167) (actual time=8,623.678..10,259.128 rows=390,912 loops=1)

  • Hash Cond: (signal_quality.quality_id = quality.quality_id)
5. 66.991 10,196.527 ↑ 1.5 390,912 1

Hash Left Join (cost=1,658,731.56..1,808,388.90 rows=573,414 width=107) (actual time=8,623.647..10,196.527 rows=390,912 loops=1)

  • Hash Cond: (signals_signal_quality_association.signal_quality_id = signal_quality.signal_quality_id)
6. 87.638 10,123.795 ↑ 1.5 390,912 1

Hash Left Join (cost=1,658,149.30..1,799,922.20 rows=573,414 width=107) (actual time=8,617.788..10,123.795 rows=390,912 loops=1)

  • Hash Cond: (signal.site_id = site.site_id)
7. 1,110.819 10,036.126 ↑ 1.5 390,912 1

Hash Right Join (cost=1,658,146.22..1,792,034.67 rows=573,414 width=95) (actual time=8,617.738..10,036.126 rows=390,912 loops=1)

  • Hash Cond: (signals_signal_quality_association.signal_id = signal.signal_id)
8. 411.571 411.571 ↓ 1.0 4,807,213 1

Seq Scan on signals_signal_quality_association (cost=0.00..69,528.42 rows=4,806,242 width=8) (actual time=0.033..411.571 rows=4,807,213 loops=1)

9. 112.616 8,513.736 ↑ 1.5 390,912 1

Hash (cost=1,642,578.54..1,642,578.54 rows=573,414 width=91) (actual time=8,513.736..8,513.736 rows=390,912 loops=1)

  • Buckets: 32768 Batches: 32 Memory Usage: 1713kB
10. 105.598 8,401.120 ↑ 1.5 390,912 1

Hash Right Join (cost=1,634,679.29..1,642,578.54 rows=573,414 width=91) (actual time=8,295.571..8,401.120 rows=390,912 loops=1)

  • Hash Cond: (signals_comments_association.signal_id = signal.signal_id)
11. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on signals_comments_association (cost=0.00..32.60 rows=2,260 width=8) (actual time=0.001..0.001 rows=0 loops=1)

12. 133.986 8,295.521 ↑ 1.5 390,912 1

Hash (cost=1,619,671.61..1,619,671.61 rows=573,414 width=87) (actual time=8,295.521..8,295.521 rows=390,912 loops=1)

  • Buckets: 32768 Batches: 32 Memory Usage: 1619kB
13. 92.453 8,161.535 ↑ 1.5 390,912 1

Hash Join (cost=443,010.06..1,619,671.61 rows=573,414 width=87) (actual time=2,356.737..8,161.535 rows=390,912 loops=1)

  • Hash Cond: (signal.parameter_id = parameter.parameter_id)
14. 1,964.345 8,069.059 ↑ 2.6 390,912 1

Hash Join (cost=443,008.56..1,610,124.08 rows=1,016,507 width=76) (actual time=2,356.707..8,069.059 rows=390,912 loops=1)

  • Hash Cond: (signal.source_id = source.source_id)
15. 3,767.896 6,104.684 ↑ 1.0 20,459,097 1

Bitmap Heap Scan on signal (cost=443,004.23..1,523,020.38 rows=20,552,943 width=32) (actual time=2,346.170..6,104.684 rows=20,459,097 loops=1)

  • Recheck Cond: (('2018-10-01 00:00:00'::timestamp without time zone <= "timestamp") AND ("timestamp" <= '2019-01-01 00:00:00'::timestamp without time zone))
  • Rows Removed by Index Recheck: 29277
  • Heap Blocks: exact=31134 lossy=184383
16. 2,336.788 2,336.788 ↑ 1.0 20,459,097 1

Bitmap Index Scan on ix_signal_timestamp (cost=0.00..437,866.00 rows=20,552,943 width=0) (actual time=2,336.788..2,336.788 rows=20,459,097 loops=1)

  • Index Cond: (('2018-10-01 00:00:00'::timestamp without time zone <= "timestamp") AND ("timestamp" <= '2019-01-01 00:00:00'::timestamp without time zone))
17. 0.001 0.030 ↑ 2.0 2 1

Hash (cost=4.28..4.28 rows=4 width=52) (actual time=0.030..0.030 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 0.016 0.029 ↑ 2.0 2 1

Hash Join (cost=1.24..4.28 rows=4 width=52) (actual time=0.021..0.029 rows=2 loops=1)

  • Hash Cond: (source.source_type_id = source_type.source_type_id)
19. 0.005 0.005 ↓ 1.1 83 1

Seq Scan on source (cost=0.00..2.73 rows=73 width=38) (actual time=0.001..0.005 rows=83 loops=1)

20. 0.001 0.008 ↑ 1.0 1 1

Hash (cost=1.23..1.23 rows=1 width=22) (actual time=0.008..0.008 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
21. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on source_type (cost=0.00..1.23 rows=1 width=22) (actual time=0.006..0.007 rows=1 loops=1)

  • Filter: ((name)::text = 'Hach_Flo-Dar'::text)
  • Rows Removed by Filter: 18
22. 0.011 0.023 ↓ 2.1 46 1

Hash (cost=1.22..1.22 rows=22 width=19) (actual time=0.023..0.023 rows=46 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
23. 0.012 0.012 ↓ 2.1 46 1

Seq Scan on parameter (cost=0.00..1.22 rows=22 width=19) (actual time=0.005..0.012 rows=46 loops=1)

24. 0.012 0.031 ↑ 1.0 48 1

Hash (cost=2.48..2.48 rows=48 width=20) (actual time=0.031..0.031 rows=48 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
25. 0.019 0.019 ↑ 1.0 48 1

Seq Scan on site (cost=0.00..2.48 rows=48 width=20) (actual time=0.009..0.019 rows=48 loops=1)

26. 2.956 5.741 ↑ 1.0 20,145 1

Hash (cost=330.45..330.45 rows=20,145 width=8) (actual time=5.741..5.741 rows=20,145 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1043kB
27. 2.785 2.785 ↑ 1.0 20,145 1

Seq Scan on signal_quality (cost=0.00..330.45 rows=20,145 width=8) (actual time=0.015..2.785 rows=20,145 loops=1)

28. 0.003 0.015 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=68) (actual time=0.015..0.015 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
29. 0.012 0.012 ↑ 1.0 3 1

Seq Scan on quality (cost=0.00..1.03 rows=3 width=68) (actual time=0.012..0.012 rows=3 loops=1)