explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Z0J

Settings
# exclusive inclusive rows x rows loops node
1. 363.286 10,923.406 ↑ 1.5 390,912 1

Sort (cost=2,041,574.57..2,043,008.10 rows=573,414 width=167) (actual time=10,867.308..10,923.406 rows=390,912 loops=1)

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

GroupAggregate (cost=1,918,186.74..1,939,689.76 rows=573,414 width=167) (actual time=10,166.086..10,560.120 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. 492.670 10,308.134 ↑ 1.5 390,912 1

Sort (cost=1,918,186.74..1,919,620.27 rows=573,414 width=167) (actual time=10,166.077..10,308.134 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.222 9,815.464 ↑ 1.5 390,912 1

Hash Left Join (cost=1,658,760.14..1,816,301.93 rows=573,414 width=167) (actual time=8,172.963..9,815.464 rows=390,912 loops=1)

  • Hash Cond: (signal_quality.quality_id = quality.quality_id)
5. 65.342 9,753.232 ↑ 1.5 390,912 1

Hash Left Join (cost=1,658,731.02..1,808,388.36 rows=573,414 width=107) (actual time=8,172.939..9,753.232 rows=390,912 loops=1)

  • Hash Cond: (signals_signal_quality_association.signal_quality_id = signal_quality.signal_quality_id)
6. 88.643 9,682.097 ↑ 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,167.027..9,682.097 rows=390,912 loops=1)

  • Hash Cond: (signal.site_id = site.site_id)
7. 1,122.268 9,593.420 ↑ 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,166.974..9,593.420 rows=390,912 loops=1)

  • Hash Cond: (signals_signal_quality_association.signal_id = signal.signal_id)
8. 408.349 408.349 ↓ 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.023..408.349 rows=4,807,213 loops=1)

9. 114.228 8,062.803 ↑ 1.5 390,912 1

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

  • Buckets: 32768 Batches: 32 Memory Usage: 1713kB
10. 107.058 7,948.575 ↑ 1.5 390,912 1

Hash Right Join (cost=1,634,679.29..1,642,578.54 rows=573,414 width=91) (actual time=7,841.565..7,948.575 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. 127.366 7,841.516 ↑ 1.5 390,912 1

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

  • Buckets: 32768 Batches: 32 Memory Usage: 1619kB
13. 92.252 7,714.150 ↑ 1.5 390,912 1

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

  • Hash Cond: (signal.parameter_id = parameter.parameter_id)
14. 1,747.681 7,621.877 ↑ 2.6 390,912 1

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

  • Hash Cond: (signal.source_id = source.source_id)
15. 3,616.005 5,874.167 ↑ 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,264.756..5,874.167 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,258.162 2,258.162 ↑ 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,258.162..2,258.162 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.029 ↑ 2.0 2 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 0.012 0.028 ↑ 2.0 2 1

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

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

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

20. 0.002 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.006 0.006 ↑ 1.0 1 1

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

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

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

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

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

24. 0.014 0.034 ↑ 1.0 48 1

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

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

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

26. 2.850 5.793 ↓ 1.0 20,145 1

Hash (cost=330.21..330.21 rows=20,121 width=8) (actual time=5.793..5.793 rows=20,145 loops=1)

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

Seq Scan on signal_quality (cost=0.00..330.21 rows=20,121 width=8) (actual time=0.010..2.943 rows=20,145 loops=1)

28. 0.003 0.010 ↑ 283.3 3 1

Hash (cost=18.50..18.50 rows=850 width=68) (actual time=0.010..0.010 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
29. 0.007 0.007 ↑ 283.3 3 1

Seq Scan on quality (cost=0.00..18.50 rows=850 width=68) (actual time=0.007..0.007 rows=3 loops=1)