Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OOM on full outer join queries involving many partitions #1274

Closed
cloud-rocket opened this issue Jun 5, 2019 · 19 comments
Closed

OOM on full outer join queries involving many partitions #1274

cloud-rocket opened this issue Jun 5, 2019 · 19 comments

Comments

@cloud-rocket
Copy link

cloud-rocket commented Jun 5, 2019

Relevant system information:

  • OS: Google Container OS
  • PostgreSQL version (output of postgres --version): 11
  • TimescaleDB version (output of \dx in psql): 1.3.0
  • Installation method: Kubernetes
  • Postgres runs on 4 cores, 64gb of memory VM
  • Default settings:
    shared_buffers = 6531MB
    effective_cache_size = 19594MB
    maintenance_work_mem = 2047MB
    wal_buffers = 16MB
    work_mem = 33441kB
    max_worker_processes = 11
    max_parallel_workers = 4

Describe the bug
Postgres runs out of memory

Having 3 several years of data tables we are trying to create a materialized view with 5mins aggregation containing all the data together.

The memory usage increases while the query runs - until it reaches the threshold of 52gb

To Reproduce

  1. table - 155 partitions, ~500k rows in every partition
  2. table - 155 partitions, ~10k rows in every partition
  3. table - 155 partitions, ~10k rows in every partition

Query example:

CREATE MATERIALIZED VIEW AS
SELECT AVG("raw__23_calcs"."c_avg_cot") "i_23avgcot_pv",AVG("raw__23_calcs"."comb_a22_3") "i_23cmba22_pv",AVG("raw__23_calcs"."comb_ccr_3") "i_23cmbccr_pv",AVG("raw__23_calcs"."comb_vtb_3") "i_23cmbvtb_pv",AVG("raw__23_calcs"."comb_vtb_ni_3") "i_23vtbcni_pv",AVG("raw__23_22_ip"."i_23662052_pv") "i_23662052_pv",AVG("raw__23_22_ip"."i_23666708_pv") "i_23666708_pv",AVG("raw__23_22_ip"."i_23990672_pv") "i_23990672_pv",AVG("raw__23_22_ip"."i_23110664_pv") "i_23110664_pv",AVG("raw__23_22_ip"."i_23776763_pv") "i_23776763_pv",AVG("raw__23_22_ip"."i_23776765_pv") "i_23776765_pv",AVG("raw__23_22_ip"."i_23776813_pv") "i_23776813_pv",AVG("raw__23_22_ip"."i_23776815_pv") "i_23776815_pv",AVG("raw__23_22_ip"."i_23776863_pv") "i_23776863_pv",AVG("raw__23_22_ip"."i_23776865_pv") "i_23776865_pv",AVG("raw__23_22_ip"."i_25665711_pv") "i_25665711_pv",AVG("raw__23_22_ip"."pb_a_2_25885698_pv") "i_25885698_pv",AVG("raw_data_csv_pb_phase1"."22_tag_21ti1365") "i_21ti1365_pv",AVG("raw_data_csv_pb_phase1"."22_tag_23442400c") "i_23442400c_pv",AVG("raw_data_csv_pb_phase1"."22_tag_23442400d") "i_23442400d_pv",AVG("raw_data_csv_pb_phase1"."22_tag_23442400e") "i_23442400e_pv",AVG("raw_data_csv_pb_phase1"."22_tag_23442402c") "i_23442402c_pv",AVG("raw_data_csv_pb_phase1"."22_tag_23770203") "i_23770203_pv",AVG("raw_data_csv_pb_phase1"."22_tag_23770204") "i_23770204_pv",AVG("raw_data_csv_pb_phase1"."22_tag_23442402d") "i_23772402d_pv",AVG("raw_data_csv_pb_phase1"."22_tag_23442402e") "i_23772402e_pv",AVG("raw_data_csv_pb_phase1"."22_tag_49li5208") "i_49li5208_pv",AVG("raw_data_csv_pb_phase1"."22_tag_49li5218") "i_49li5218_pv",COALESCE(TIME_BUCKET('5 minute',"raw__23_22_ip"."timestamp"),TIME_BUCKET('5 minute',"raw__23_calcs"."timestamp"),TIME_BUCKET('5 minute',"raw_data_csv_pb_phase1"."timestamp"))+INTERVAL '5 minute' "timestamp" 
FROM "raw_data"."bbb_23_calcs" "raw__23_calcs" 
FULL OUTER JOIN "raw_data"."bbb_23_22_ip" "raw__23_22_ip" ON "raw__23_calcs"."timestamp"="raw__23_22_ip"."timestamp" 
FULL OUTER JOIN "raw_data"."csv_pb_phase1" "raw_data_csv_pb_phase1" ON "raw__23_calcs"."timestamp"="raw_data_csv_pb_phase1"."timestamp" 
GROUP BY COALESCE(TIME_BUCKET('5 minute',"raw__23_22_ip"."timestamp"),TIME_BUCKET('5 minute',"raw__23_calcs"."timestamp"),TIME_BUCKET('5 minute',"raw_data_csv_pb_phase1"."timestamp"))+INTERVAL '5 minute' 
ORDER BY COALESCE(TIME_BUCKET('5 minute',"raw__23_22_ip"."timestamp"),TIME_BUCKET('5 minute',"raw__23_calcs"."timestamp"),TIME_BUCKET('5 minute',"raw_data_csv_pb_phase1"."timestamp"))+INTERVAL '5 minute' ASC

Expected behavior
View should be created after long run time

Actual behavior
Pod is terminated as it runs out of memory

Screenshots
Only a single query is running until pod is terminated with out of memory:

image

@feikesteenbergen
Copy link
Member

Could you provide the OOM details that show all the processes together with their memory usage?

The details that are relevant look similar to the ones mentioned here:
https://serverfault.com/questions/564068/linux-oom-situation

@cloud-rocket
Copy link
Author

cloud-rocket commented Jun 5, 2019

@feikesteenbergen

Linux is not running out of memory, since Kubernetes terminates the pod on some threshold (which is ~52gb). Here is a top -d1 -o %MEM screenshots during query begin and after some runtime (the 1st postgres process is created for this query):

(After 1min runtime)
image

(After 13mins runtime)
image

(After 22mins runtime)
image

Terminated at 73% memory

MemTotal:       65976680 kB
MemFree:        17897104 kB
MemAvailable:   20859332 kB
Buffers:          856760 kB
Cached:          9622740 kB
SwapCached:            0 kB
Active:         45128928 kB
Inactive:        2024296 kB
Active(anon):   43557304 kB
Inactive(anon):   334972 kB
Active(file):    1571624 kB
Inactive(file):  1689324 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:               156 kB
Writeback:             0 kB
AnonPages:      36668924 kB
Mapped:          7164748 kB
Shmem:           7218576 kB
Slab:             538516 kB
SReclaimable:     424092 kB
SUnreclaim:       114424 kB
KernelStack:       12160 kB
PageTables:       186048 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    32988340 kB
Committed_AS:   54121336 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      415732 kB
DirectMap2M:    44673024 kB
DirectMap1G:    24117248 kB

Do you think I have a problem in the query?
Tnx

@feikesteenbergen
Copy link
Member

Do you think I have a problem in the query?

No; this behavior seems off; this should only happen if you have a query requiring a lot of memory and you have work_mem set to a very high value (say 20GB).
Each query can use multiple times work_mem, but for a query with a few joins it should be limited to only a few times work_mem.

This leads to the questions:

  1. What is the work_mem of your PostgreSQL instance?
  2. Do you explicitly set work_mem for this session/transaction using SET [LOCAL] work_mem?

@feikesteenbergen
Copy link
Member

Also, this does not directly relate to TimescaleDB, but I guess we'd rather have a sqlstate 53200 / out_of_memory for the client by PostgreSQL than Kubernetes intervening.

I'm not sure which parameters would be involved in the Kubernetes case, in classical Linux you'd reduce overcommit_ratio and disable overcommit altogether so there is never any memory starvation possible for the running node.

@cloud-rocket
Copy link
Author

@feikesteenbergen, all settings are specified at the 1st post -

  1. work_mem = 33441kB
  2. I am not specifying any specific session config values

With regards to Kubernetes, it terminates the pod at some threshold (before the node itself suffers). I agree that it'd be better if Postgres will return OOM error - how do you suggest to configure it?

Thanks

@feikesteenbergen
Copy link
Member

@cloud-rocket Would you be happy to share the (obfuscated) explain plan in this issue?

@cloud-rocket
Copy link
Author

Sure EXPLAIN ANALYZE of the internal select returns:

Sort  (cost=30985381.87..31201173.30 rows=86316572 width=120) (actual time=774956.910..800146.215 rows=85705849 loops=1)
  Sort Key: (COALESCE(raw_data_bbb_pi_ip."timestamp", raw_data_bbb_calcs."timestamp", raw_data_csv_pb_phase1."timestamp"))
  Sort Method: external merge  Disk: 2317664kB
  ->  Hash Full Join  (cost=191794.25..13386640.59 rows=86316572 width=120) (actual time=5114.725..699873.460 rows=85705849 loops=1)
        Hash Cond: (raw_data_csv_pb_phase1."timestamp" = raw_data_bbb_calcs."timestamp")
        ->  Append  (cost=0.00..11040903.58 rows=86316572 width=52) (actual time=2.831..603628.773 rows=85682277 loops=1)
              ->  Seq Scan on _hyper_2_152_chunk raw_data_csv_pb_phase1  (cost=0.00..16960.12 rows=332712 width=52) (actual time=2.828..759.969 rows=332712 loops=1)
              ->  Seq Scan on _hyper_2_153_chunk raw_data_csv_pb_phase1_1  (cost=0.00..34734.38 rows=575738 width=52) (actual time=0.911..1533.687 rows=575738 loops=1)
              ->  Seq Scan on _hyper_2_154_chunk raw_data_csv_pb_phase1_2  (cost=0.00..91158.33 rows=573433 width=52) (actual time=0.689..3615.272 rows=573433 loops=1)
              ->  Seq Scan on _hyper_2_155_chunk raw_data_csv_pb_phase1_3  (cost=0.00..90343.02 rows=570902 width=52) (actual time=1.035..3646.258 rows=570902 loops=1)
              ->  Seq Scan on _hyper_2_156_chunk raw_data_csv_pb_phase1_4  (cost=0.00..89195.07 rows=568507 width=52) (actual time=0.990..3702.626 rows=568507 loops=1)
              ->  Seq Scan on _hyper_2_157_chunk raw_data_csv_pb_phase1_5  (cost=0.00..93125.74 rows=582874 width=52) (actual time=3.347..4075.787 rows=582874 loops=1)
              ->  Seq Scan on _hyper_2_158_chunk raw_data_csv_pb_phase1_6  (cost=0.00..62749.63 rows=583063 width=52) (actual time=1.076..2728.339 rows=583063 loops=1)
              ->  Seq Scan on _hyper_2_159_chunk raw_data_csv_pb_phase1_7  (cost=0.00..75252.06 rows=566106 width=52) (actual time=3.525..3086.387 rows=566106 loops=1)
              ->  Seq Scan on _hyper_2_160_chunk raw_data_csv_pb_phase1_8  (cost=0.00..53823.52 rows=576952 width=52) (actual time=1.855..2174.670 rows=576952 loops=1)
              ->  Seq Scan on _hyper_2_161_chunk raw_data_csv_pb_phase1_9  (cost=0.00..53688.68 rows=584568 width=52) (actual time=1.401..1958.502 rows=584568 loops=1)
              ->  Seq Scan on _hyper_2_162_chunk raw_data_csv_pb_phase1_10  (cost=0.00..69559.61 rows=588861 width=52) (actual time=1.450..2635.641 rows=588861 loops=1)
              ->  Seq Scan on _hyper_2_163_chunk raw_data_csv_pb_phase1_11  (cost=0.00..82808.84 rows=585084 width=52) (actual time=1.635..2913.788 rows=585084 loops=1)
              ->  Seq Scan on _hyper_2_164_chunk raw_data_csv_pb_phase1_12  (cost=0.00..69412.76 rows=580876 width=52) (actual time=1.245..2475.168 rows=580876 loops=1)
              ->  Seq Scan on _hyper_2_165_chunk raw_data_csv_pb_phase1_13  (cost=0.00..70895.21 rows=555621 width=52) (actual time=1.368..2317.414 rows=555621 loops=1)
              ->  Seq Scan on _hyper_2_166_chunk raw_data_csv_pb_phase1_14  (cost=0.00..63221.24 rows=541024 width=52) (actual time=1.399..2134.755 rows=541024 loops=1)
              ->  Seq Scan on _hyper_2_167_chunk raw_data_csv_pb_phase1_15  (cost=0.00..55780.37 rows=540837 width=52) (actual time=2.102..1973.590 rows=540837 loops=1)
              ->  Seq Scan on _hyper_2_168_chunk raw_data_csv_pb_phase1_16  (cost=0.00..63898.76 rows=543876 width=52) (actual time=1.541..3428.278 rows=543876 loops=1)
              ->  Seq Scan on _hyper_2_169_chunk raw_data_csv_pb_phase1_17  (cost=0.00..58113.25 rows=539925 width=52) (actual time=1.729..2945.830 rows=539925 loops=1)
              ->  Seq Scan on _hyper_2_170_chunk raw_data_csv_pb_phase1_18  (cost=0.00..59547.78 rows=533578 width=52) (actual time=1.740..2092.288 rows=533578 loops=1)
              ->  Seq Scan on _hyper_2_171_chunk raw_data_csv_pb_phase1_19  (cost=0.00..61476.73 rows=532273 width=52) (actual time=1.743..2113.485 rows=532273 loops=1)
              ->  Seq Scan on _hyper_2_172_chunk raw_data_csv_pb_phase1_20  (cost=0.00..67639.25 rows=537025 width=52) (actual time=1.256..2244.208 rows=537025 loops=1)
              ->  Seq Scan on _hyper_2_173_chunk raw_data_csv_pb_phase1_21  (cost=0.00..65859.91 rows=536591 width=52) (actual time=1.445..2483.753 rows=536591 loops=1)
              ->  Seq Scan on _hyper_2_174_chunk raw_data_csv_pb_phase1_22  (cost=0.00..66163.08 rows=583608 width=52) (actual time=1.641..2424.381 rows=583608 loops=1)
              ->  Seq Scan on _hyper_2_175_chunk raw_data_csv_pb_phase1_23  (cost=0.00..55051.32 rows=587932 width=52) (actual time=2.447..2065.310 rows=587932 loops=1)
              ->  Seq Scan on _hyper_2_176_chunk raw_data_csv_pb_phase1_24  (cost=0.00..47573.67 rows=589067 width=52) (actual time=2.013..1710.152 rows=589067 loops=1)
              ->  Seq Scan on _hyper_2_177_chunk raw_data_csv_pb_phase1_25  (cost=0.00..58157.91 rows=586891 width=52) (actual time=1.774..1965.984 rows=586891 loops=1)
              ->  Seq Scan on _hyper_2_178_chunk raw_data_csv_pb_phase1_26  (cost=0.00..68805.10 rows=573110 width=52) (actual time=1.654..2255.574 rows=573110 loops=1)
              ->  Seq Scan on _hyper_2_179_chunk raw_data_csv_pb_phase1_27  (cost=0.00..56732.33 rows=554933 width=52) (actual time=1.215..1820.505 rows=554933 loops=1)
              ->  Seq Scan on _hyper_2_180_chunk raw_data_csv_pb_phase1_28  (cost=0.00..63495.84 rows=548984 width=52) (actual time=1.300..1960.161 rows=548984 loops=1)
              ->  Seq Scan on _hyper_2_181_chunk raw_data_csv_pb_phase1_29  (cost=0.00..64866.11 rows=572111 width=52) (actual time=1.418..2062.632 rows=572111 loops=1)
              ->  Seq Scan on _hyper_2_182_chunk raw_data_csv_pb_phase1_30  (cost=0.00..63374.70 rows=580770 width=52) (actual time=1.467..2017.861 rows=580770 loops=1)
              ->  Seq Scan on _hyper_2_183_chunk raw_data_csv_pb_phase1_31  (cost=0.00..72806.07 rows=548407 width=52) (actual time=1.799..2310.508 rows=548407 loops=1)
              ->  Seq Scan on _hyper_2_184_chunk raw_data_csv_pb_phase1_32  (cost=0.00..62098.74 rows=540874 width=52) (actual time=1.795..1958.403 rows=540874 loops=1)
              ->  Seq Scan on _hyper_2_185_chunk raw_data_csv_pb_phase1_33  (cost=0.00..56648.41 rows=555041 width=52) (actual time=1.594..1810.359 rows=555041 loops=1)
              ->  Seq Scan on _hyper_2_186_chunk raw_data_csv_pb_phase1_34  (cost=0.00..66808.75 rows=560475 width=52) (actual time=1.801..2084.422 rows=560475 loops=1)
              ->  Seq Scan on _hyper_2_187_chunk raw_data_csv_pb_phase1_35  (cost=0.00..72790.72 rows=553972 width=52) (actual time=1.829..2396.249 rows=553972 loops=1)
              ->  Seq Scan on _hyper_2_188_chunk raw_data_csv_pb_phase1_36  (cost=0.00..66708.14 rows=556614 width=52) (actual time=1.546..2120.318 rows=556614 loops=1)
              ->  Seq Scan on _hyper_2_189_chunk raw_data_csv_pb_phase1_37  (cost=0.00..76416.32 rows=542132 width=52) (actual time=1.387..2402.502 rows=542132 loops=1)
              ->  Seq Scan on _hyper_2_190_chunk raw_data_csv_pb_phase1_38  (cost=0.00..88879.97 rows=895597 width=52) (actual time=1.502..2706.648 rows=549950 loops=1)
              ->  Seq Scan on _hyper_2_191_chunk raw_data_csv_pb_phase1_39  (cost=0.00..79830.41 rows=544441 width=52) (actual time=1.363..2596.685 rows=544441 loops=1)
              ->  Seq Scan on _hyper_2_192_chunk raw_data_csv_pb_phase1_40  (cost=0.00..68197.96 rows=540196 width=52) (actual time=1.375..2484.395 rows=540196 loops=1)
              ->  Seq Scan on _hyper_2_193_chunk raw_data_csv_pb_phase1_41  (cost=0.00..60031.06 rows=565606 width=52) (actual time=1.756..2242.285 rows=565606 loops=1)
              ->  Seq Scan on _hyper_2_194_chunk raw_data_csv_pb_phase1_42  (cost=0.00..74773.02 rows=583302 width=52) (actual time=1.488..2623.886 rows=583302 loops=1)
              ->  Seq Scan on _hyper_2_195_chunk raw_data_csv_pb_phase1_43  (cost=0.00..52401.14 rows=562014 width=52) (actual time=1.475..1721.279 rows=562014 loops=1)
              ->  Seq Scan on _hyper_2_196_chunk raw_data_csv_pb_phase1_44  (cost=0.00..74789.33 rows=587033 width=52) (actual time=1.640..2378.405 rows=587033 loops=1)
              ->  Seq Scan on _hyper_2_197_chunk raw_data_csv_pb_phase1_45  (cost=0.00..61923.13 rows=586413 width=52) (actual time=1.629..2060.621 rows=586413 loops=1)
              ->  Seq Scan on _hyper_2_198_chunk raw_data_csv_pb_phase1_46  (cost=0.00..54228.44 rows=586744 width=52) (actual time=1.677..1781.893 rows=586744 loops=1)
              ->  Seq Scan on _hyper_2_199_chunk raw_data_csv_pb_phase1_47  (cost=0.00..65550.37 rows=577937 width=52) (actual time=1.503..2204.022 rows=577937 loops=1)
              ->  Seq Scan on _hyper_2_200_chunk raw_data_csv_pb_phase1_48  (cost=0.00..47033.75 rows=572775 width=52) (actual time=1.259..1569.260 rows=572775 loops=1)
              ->  Seq Scan on _hyper_2_201_chunk raw_data_csv_pb_phase1_49  (cost=0.00..61210.76 rows=573276 width=52) (actual time=1.331..1908.289 rows=573276 loops=1)
              ->  Seq Scan on _hyper_2_202_chunk raw_data_csv_pb_phase1_50  (cost=0.00..58213.18 rows=572018 width=52) (actual time=1.349..1864.835 rows=572018 loops=1)
              ->  Seq Scan on _hyper_2_203_chunk raw_data_csv_pb_phase1_51  (cost=0.00..55084.51 rows=558951 width=52) (actual time=1.378..1819.237 rows=558951 loops=1)
              ->  Seq Scan on _hyper_2_204_chunk raw_data_csv_pb_phase1_52  (cost=0.00..65790.65 rows=563265 width=52) (actual time=1.390..2127.157 rows=563265 loops=1)
              ->  Seq Scan on _hyper_2_205_chunk raw_data_csv_pb_phase1_53  (cost=0.00..60297.03 rows=574703 width=52) (actual time=1.487..1877.239 rows=574703 loops=1)
              ->  Seq Scan on _hyper_2_206_chunk raw_data_csv_pb_phase1_54  (cost=0.00..49518.91 rows=579991 width=52) (actual time=1.326..1640.841 rows=579991 loops=1)
              ->  Seq Scan on _hyper_2_207_chunk raw_data_csv_pb_phase1_55  (cost=0.00..65206.79 rows=570579 width=52) (actual time=1.550..2072.996 rows=570579 loops=1)
              ->  Seq Scan on _hyper_2_208_chunk raw_data_csv_pb_phase1_56  (cost=0.00..55701.98 rows=557398 width=52) (actual time=1.261..1820.282 rows=557398 loops=1)
              ->  Seq Scan on _hyper_2_209_chunk raw_data_csv_pb_phase1_57  (cost=0.00..69307.85 rows=551285 width=52) (actual time=1.723..2164.741 rows=551285 loops=1)
              ->  Seq Scan on _hyper_2_210_chunk raw_data_csv_pb_phase1_58  (cost=0.00..68166.25 rows=565225 width=52) (actual time=1.378..2149.482 rows=565225 loops=1)
              ->  Seq Scan on _hyper_2_211_chunk raw_data_csv_pb_phase1_59  (cost=0.00..64857.27 rows=558827 width=52) (actual time=1.410..1996.885 rows=558827 loops=1)
              ->  Seq Scan on _hyper_2_212_chunk raw_data_csv_pb_phase1_60  (cost=0.00..67883.59 rows=556859 width=52) (actual time=1.557..2093.196 rows=556859 loops=1)
              ->  Seq Scan on _hyper_2_213_chunk raw_data_csv_pb_phase1_61  (cost=0.00..65648.59 rows=534059 width=52) (actual time=1.328..2144.728 rows=534059 loops=1)
              ->  Seq Scan on _hyper_2_214_chunk raw_data_csv_pb_phase1_62  (cost=0.00..71837.33 rows=576533 width=52) (actual time=1.278..2223.561 rows=576533 loops=1)
              ->  Seq Scan on _hyper_2_215_chunk raw_data_csv_pb_phase1_63  (cost=0.00..71133.97 rows=558497 width=52) (actual time=1.495..2228.326 rows=558497 loops=1)
              ->  Seq Scan on _hyper_2_216_chunk raw_data_csv_pb_phase1_64  (cost=0.00..54957.88 rows=554188 width=52) (actual time=1.771..1853.839 rows=554188 loops=1)
              ->  Seq Scan on _hyper_2_217_chunk raw_data_csv_pb_phase1_65  (cost=0.00..73471.01 rows=581901 width=52) (actual time=1.278..2288.878 rows=581901 loops=1)
              ->  Seq Scan on _hyper_2_218_chunk raw_data_csv_pb_phase1_66  (cost=0.00..66928.67 rows=577967 width=52) (actual time=1.441..2114.675 rows=577967 loops=1)
              ->  Seq Scan on _hyper_2_219_chunk raw_data_csv_pb_phase1_67  (cost=0.00..65122.32 rows=555932 width=52) (actual time=1.394..2016.578 rows=555932 loops=1)
              ->  Seq Scan on _hyper_2_220_chunk raw_data_csv_pb_phase1_68  (cost=0.00..61916.43 rows=555743 width=52) (actual time=1.426..1950.454 rows=555743 loops=1)
              ->  Seq Scan on _hyper_2_221_chunk raw_data_csv_pb_phase1_69  (cost=0.00..58642.35 rows=510035 width=52) (actual time=1.179..1775.633 rows=510035 loops=1)
              ->  Seq Scan on _hyper_2_222_chunk raw_data_csv_pb_phase1_70  (cost=0.00..66764.35 rows=516435 width=52) (actual time=1.257..2067.198 rows=516435 loops=1)
              ->  Seq Scan on _hyper_2_223_chunk raw_data_csv_pb_phase1_71  (cost=0.00..71948.57 rows=843057 width=52) (actual time=1.302..2103.203 rows=554415 loops=1)
              ->  Seq Scan on _hyper_2_224_chunk raw_data_csv_pb_phase1_72  (cost=0.00..54403.10 rows=583610 width=52) (actual time=1.497..1738.568 rows=583610 loops=1)
              ->  Seq Scan on _hyper_2_225_chunk raw_data_csv_pb_phase1_73  (cost=0.00..72411.03 rows=582303 width=52) (actual time=1.241..2199.502 rows=582303 loops=1)
              ->  Seq Scan on _hyper_2_226_chunk raw_data_csv_pb_phase1_74  (cost=0.00..66088.43 rows=584443 width=52) (actual time=1.353..2192.553 rows=584443 loops=1)
              ->  Seq Scan on _hyper_2_227_chunk raw_data_csv_pb_phase1_75  (cost=0.00..71876.75 rows=588175 width=52) (actual time=1.502..2227.724 rows=588175 loops=1)
              ->  Seq Scan on _hyper_2_228_chunk raw_data_csv_pb_phase1_76  (cost=0.00..65510.44 rows=588644 width=52) (actual time=1.559..2004.628 rows=588644 loops=1)
              ->  Seq Scan on _hyper_2_229_chunk raw_data_csv_pb_phase1_77  (cost=0.00..56158.70 rows=572270 width=52) (actual time=1.662..1833.846 rows=572270 loops=1)
              ->  Seq Scan on _hyper_2_230_chunk raw_data_csv_pb_phase1_78  (cost=0.00..56297.79 rows=562979 width=52) (actual time=1.472..1746.210 rows=562979 loops=1)
              ->  Seq Scan on _hyper_2_231_chunk raw_data_csv_pb_phase1_79  (cost=0.00..74381.67 rows=569267 width=52) (actual time=3.666..2350.906 rows=569267 loops=1)
              ->  Seq Scan on _hyper_2_232_chunk raw_data_csv_pb_phase1_80  (cost=0.00..105179.52 rows=573152 width=52) (actual time=2.059..3355.607 rows=573152 loops=1)
              ->  Seq Scan on _hyper_2_233_chunk raw_data_csv_pb_phase1_81  (cost=0.00..102738.33 rows=570233 width=52) (actual time=1.716..3349.020 rows=570233 loops=1)
              ->  Seq Scan on _hyper_2_234_chunk raw_data_csv_pb_phase1_82  (cost=0.00..66115.04 rows=579904 width=52) (actual time=1.593..2368.818 rows=579904 loops=1)
              ->  Seq Scan on _hyper_2_235_chunk raw_data_csv_pb_phase1_83  (cost=0.00..68183.13 rows=589613 width=52) (actual time=1.312..2257.797 rows=589613 loops=1)
              ->  Seq Scan on _hyper_2_236_chunk raw_data_csv_pb_phase1_84  (cost=0.00..65702.34 rows=590034 width=52) (actual time=1.592..4017.077 rows=590034 loops=1)
              ->  Seq Scan on _hyper_2_237_chunk raw_data_csv_pb_phase1_85  (cost=0.00..55086.11 rows=573011 width=52) (actual time=1.504..4537.199 rows=573011 loops=1)
              ->  Seq Scan on _hyper_2_238_chunk raw_data_csv_pb_phase1_86  (cost=0.00..66310.88 rows=567288 width=52) (actual time=1.448..5219.796 rows=567288 loops=1)
              ->  Seq Scan on _hyper_2_239_chunk raw_data_csv_pb_phase1_87  (cost=0.00..68951.29 rows=566529 width=52) (actual time=7.009..5618.627 rows=566529 loops=1)
              ->  Seq Scan on _hyper_2_240_chunk raw_data_csv_pb_phase1_88  (cost=0.00..81377.18 rows=544118 width=52) (actual time=2.581..6543.691 rows=544118 loops=1)
              ->  Seq Scan on _hyper_2_241_chunk raw_data_csv_pb_phase1_89  (cost=0.00..66606.99 rows=548999 width=52) (actual time=1.241..5214.998 rows=548999 loops=1)
              ->  Seq Scan on _hyper_2_242_chunk raw_data_csv_pb_phase1_90  (cost=0.00..47086.38 rows=579038 width=52) (actual time=2.789..3863.091 rows=579038 loops=1)
              ->  Seq Scan on _hyper_2_243_chunk raw_data_csv_pb_phase1_91  (cost=0.00..60134.72 rows=561972 width=52) (actual time=1.473..4894.299 rows=561972 loops=1)
              ->  Seq Scan on _hyper_2_244_chunk raw_data_csv_pb_phase1_92  (cost=0.00..106169.40 rows=565440 width=52) (actual time=1.358..8210.676 rows=565440 loops=1)
              ->  Seq Scan on _hyper_2_245_chunk raw_data_csv_pb_phase1_93  (cost=0.00..104293.55 rows=562255 width=52) (actual time=1.685..8292.792 rows=562255 loops=1)
              ->  Seq Scan on _hyper_2_246_chunk raw_data_csv_pb_phase1_94  (cost=0.00..82599.69 rows=549469 width=52) (actual time=1.320..6436.442 rows=549469 loops=1)
              ->  Seq Scan on _hyper_2_247_chunk raw_data_csv_pb_phase1_95  (cost=0.00..98929.27 rows=561827 width=52) (actual time=1.447..7296.988 rows=561827 loops=1)
              ->  Seq Scan on _hyper_2_248_chunk raw_data_csv_pb_phase1_96  (cost=0.00..100615.08 rows=566008 width=52) (actual time=1.751..7878.122 rows=566008 loops=1)
              ->  Seq Scan on _hyper_2_249_chunk raw_data_csv_pb_phase1_97  (cost=0.00..80654.37 rows=564737 width=52) (actual time=1.658..6257.506 rows=564737 loops=1)
              ->  Seq Scan on _hyper_2_250_chunk raw_data_csv_pb_phase1_98  (cost=0.00..106139.87 rows=572387 width=52) (actual time=1.446..8244.631 rows=572387 loops=1)
              ->  Seq Scan on _hyper_2_251_chunk raw_data_csv_pb_phase1_99  (cost=0.00..63853.35 rows=568135 width=52) (actual time=1.898..5463.942 rows=568135 loops=1)
              ->  Seq Scan on _hyper_2_252_chunk raw_data_csv_pb_phase1_100  (cost=0.00..68109.85 rows=567585 width=52) (actual time=1.626..5555.584 rows=567585 loops=1)
              ->  Seq Scan on _hyper_2_253_chunk raw_data_csv_pb_phase1_101  (cost=0.00..69373.67 rows=567167 width=52) (actual time=1.520..5745.179 rows=567167 loops=1)
              ->  Seq Scan on _hyper_2_254_chunk raw_data_csv_pb_phase1_102  (cost=0.00..68639.41 rows=564341 width=52) (actual time=2.952..5461.822 rows=564341 loops=1)
              ->  Seq Scan on _hyper_2_255_chunk raw_data_csv_pb_phase1_103  (cost=0.00..65314.86 rows=570086 width=52) (actual time=1.493..5273.626 rows=570086 loops=1)
              ->  Seq Scan on _hyper_2_256_chunk raw_data_csv_pb_phase1_104  (cost=0.00..70602.33 rows=568133 width=52) (actual time=2.117..5639.852 rows=568133 loops=1)
              ->  Seq Scan on _hyper_2_257_chunk raw_data_csv_pb_phase1_105  (cost=0.00..66531.87 rows=566387 width=52) (actual time=1.732..5608.691 rows=566387 loops=1)
              ->  Seq Scan on _hyper_2_258_chunk raw_data_csv_pb_phase1_106  (cost=0.00..97573.94 rows=565794 width=52) (actual time=2.083..7860.879 rows=565794 loops=1)
              ->  Seq Scan on _hyper_2_259_chunk raw_data_csv_pb_phase1_107  (cost=0.00..100016.07 rows=566007 width=52) (actual time=1.920..8087.468 rows=566007 loops=1)
              ->  Seq Scan on _hyper_2_260_chunk raw_data_csv_pb_phase1_108  (cost=0.00..64533.93 rows=564793 width=52) (actual time=2.328..5667.443 rows=564793 loops=1)
              ->  Seq Scan on _hyper_2_261_chunk raw_data_csv_pb_phase1_109  (cost=0.00..56721.32 rows=564732 width=52) (actual time=3.132..4637.425 rows=564732 loops=1)
              ->  Seq Scan on _hyper_2_262_chunk raw_data_csv_pb_phase1_110  (cost=0.00..104841.50 rows=562450 width=52) (actual time=1.702..8175.540 rows=562450 loops=1)
              ->  Seq Scan on _hyper_2_263_chunk raw_data_csv_pb_phase1_111  (cost=0.00..86408.97 rows=565097 width=52) (actual time=1.676..7115.304 rows=565097 loops=1)
              ->  Seq Scan on _hyper_2_264_chunk raw_data_csv_pb_phase1_112  (cost=0.00..71127.24 rows=571924 width=52) (actual time=3.281..5818.341 rows=571924 loops=1)
              ->  Seq Scan on _hyper_2_265_chunk raw_data_csv_pb_phase1_113  (cost=0.00..91660.71 rows=588371 width=52) (actual time=1.928..7435.400 rows=588371 loops=1)
              ->  Seq Scan on _hyper_2_266_chunk raw_data_csv_pb_phase1_114  (cost=0.00..76156.11 rows=586611 width=52) (actual time=1.835..6110.392 rows=586611 loops=1)
              ->  Seq Scan on _hyper_2_267_chunk raw_data_csv_pb_phase1_115  (cost=0.00..71447.87 rows=568087 width=52) (actual time=1.684..5855.007 rows=568087 loops=1)
              ->  Seq Scan on _hyper_2_268_chunk raw_data_csv_pb_phase1_116  (cost=0.00..78513.29 rows=554829 width=52) (actual time=1.556..6178.381 rows=554829 loops=1)
              ->  Seq Scan on _hyper_2_269_chunk raw_data_csv_pb_phase1_117  (cost=0.00..66976.23 rows=581423 width=52) (actual time=1.485..5363.911 rows=581423 loops=1)
              ->  Seq Scan on _hyper_2_270_chunk raw_data_csv_pb_phase1_118  (cost=0.00..73744.64 rows=588064 width=52) (actual time=3.139..5887.598 rows=588064 loops=1)
              ->  Seq Scan on _hyper_2_271_chunk raw_data_csv_pb_phase1_119  (cost=0.00..72805.07 rows=578707 width=52) (actual time=1.692..5815.383 rows=578707 loops=1)
              ->  Seq Scan on _hyper_2_272_chunk raw_data_csv_pb_phase1_120  (cost=0.00..76436.29 rows=572329 width=52) (actual time=1.683..6148.174 rows=572329 loops=1)
              ->  Seq Scan on _hyper_2_273_chunk raw_data_csv_pb_phase1_121  (cost=0.00..67786.49 rows=574849 width=52) (actual time=1.634..5339.297 rows=574849 loops=1)
              ->  Seq Scan on _hyper_2_274_chunk raw_data_csv_pb_phase1_122  (cost=0.00..69613.74 rows=557974 width=52) (actual time=1.683..5250.219 rows=557974 loops=1)
              ->  Seq Scan on _hyper_2_275_chunk raw_data_csv_pb_phase1_123  (cost=0.00..63400.75 rows=554375 width=52) (actual time=1.626..5015.615 rows=554375 loops=1)
              ->  Seq Scan on _hyper_2_276_chunk raw_data_csv_pb_phase1_124  (cost=0.00..61958.24 rows=578124 width=52) (actual time=1.571..4941.141 rows=578124 loops=1)
              ->  Seq Scan on _hyper_2_277_chunk raw_data_csv_pb_phase1_125  (cost=0.00..74818.23 rows=585723 width=52) (actual time=1.567..5868.135 rows=585723 loops=1)
              ->  Seq Scan on _hyper_2_278_chunk raw_data_csv_pb_phase1_126  (cost=0.00..75207.91 rows=587091 width=52) (actual time=1.219..5986.690 rows=587091 loops=1)
              ->  Seq Scan on _hyper_2_279_chunk raw_data_csv_pb_phase1_127  (cost=0.00..71719.95 rows=589495 width=52) (actual time=1.675..5753.165 rows=589495 loops=1)
              ->  Seq Scan on _hyper_2_280_chunk raw_data_csv_pb_phase1_128  (cost=0.00..70700.09 rows=582409 width=52) (actual time=2.453..5539.854 rows=582409 loops=1)
              ->  Seq Scan on _hyper_2_281_chunk raw_data_csv_pb_phase1_129  (cost=0.00..66035.27 rows=580327 width=52) (actual time=1.482..5042.455 rows=580327 loops=1)
              ->  Seq Scan on _hyper_2_282_chunk raw_data_csv_pb_phase1_130  (cost=0.00..75394.32 rows=579732 width=52) (actual time=1.532..5935.712 rows=579732 loops=1)
              ->  Seq Scan on _hyper_2_283_chunk raw_data_csv_pb_phase1_131  (cost=0.00..84438.06 rows=582106 width=52) (actual time=1.836..6567.255 rows=582106 loops=1)
              ->  Seq Scan on _hyper_2_284_chunk raw_data_csv_pb_phase1_132  (cost=0.00..72610.50 rows=580650 width=52) (actual time=1.600..8995.546 rows=580650 loops=1)
              ->  Seq Scan on _hyper_2_285_chunk raw_data_csv_pb_phase1_133  (cost=0.00..72271.07 rows=584807 width=52) (actual time=1.825..5715.562 rows=584807 loops=1)
              ->  Seq Scan on _hyper_2_286_chunk raw_data_csv_pb_phase1_134  (cost=0.00..74574.49 rows=580449 width=52) (actual time=1.813..5696.350 rows=580449 loops=1)
              ->  Seq Scan on _hyper_2_287_chunk raw_data_csv_pb_phase1_135  (cost=0.00..97102.32 rows=580932 width=52) (actual time=1.582..7737.566 rows=580932 loops=1)
              ->  Seq Scan on _hyper_2_288_chunk raw_data_csv_pb_phase1_136  (cost=0.00..91570.34 rows=581834 width=52) (actual time=1.820..7362.172 rows=581834 loops=1)
              ->  Seq Scan on _hyper_2_289_chunk raw_data_csv_pb_phase1_137  (cost=0.00..70991.95 rows=582595 width=52) (actual time=1.594..5849.702 rows=582595 loops=1)
              ->  Seq Scan on _hyper_2_290_chunk raw_data_csv_pb_phase1_138  (cost=0.00..75833.43 rows=577643 width=52) (actual time=1.384..6126.670 rows=577643 loops=1)
              ->  Seq Scan on _hyper_2_291_chunk raw_data_csv_pb_phase1_139  (cost=0.00..71550.42 rows=581442 width=52) (actual time=1.670..5683.730 rows=581442 loops=1)
              ->  Seq Scan on _hyper_2_292_chunk raw_data_csv_pb_phase1_140  (cost=0.00..77013.79 rows=586179 width=52) (actual time=3.328..6371.031 rows=586179 loops=1)
              ->  Seq Scan on _hyper_2_293_chunk raw_data_csv_pb_phase1_141  (cost=0.00..72645.81 rows=589681 width=52) (actual time=1.330..5852.875 rows=589681 loops=1)
              ->  Seq Scan on _hyper_2_294_chunk raw_data_csv_pb_phase1_142  (cost=0.00..73901.09 rows=589009 width=52) (actual time=1.353..6252.480 rows=589009 loops=1)
              ->  Seq Scan on _hyper_2_295_chunk raw_data_csv_pb_phase1_143  (cost=0.00..69189.35 rows=588435 width=52) (actual time=2.589..5667.023 rows=588435 loops=1)
              ->  Seq Scan on _hyper_2_296_chunk raw_data_csv_pb_phase1_144  (cost=0.00..84516.35 rows=584735 width=52) (actual time=1.369..6874.455 rows=584735 loops=1)
              ->  Seq Scan on _hyper_2_297_chunk raw_data_csv_pb_phase1_145  (cost=0.00..89718.78 rows=575978 width=52) (actual time=2.474..6984.038 rows=575978 loops=1)
              ->  Seq Scan on _hyper_2_298_chunk raw_data_csv_pb_phase1_146  (cost=0.00..82666.79 rows=579179 width=52) (actual time=2.063..6249.606 rows=579179 loops=1)
              ->  Seq Scan on _hyper_2_299_chunk raw_data_csv_pb_phase1_147  (cost=0.00..73421.56 rows=564956 width=52) (actual time=1.576..5636.711 rows=564956 loops=1)
              ->  Seq Scan on _hyper_2_300_chunk raw_data_csv_pb_phase1_148  (cost=0.00..85459.90 rows=573490 width=52) (actual time=1.257..6633.547 rows=573490 loops=1)
              ->  Seq Scan on _hyper_2_301_chunk raw_data_csv_pb_phase1_149  (cost=0.00..74235.59 rows=580159 width=52) (actual time=1.600..5753.839 rows=580159 loops=1)
              ->  Seq Scan on _hyper_2_302_chunk raw_data_csv_pb_phase1_150  (cost=0.00..38820.20 rows=474520 width=52) (actual time=1.402..3091.421 rows=474633 loops=1)
              ->  Seq Scan on _hyper_2_303_chunk raw_data_csv_pb_phase1_151  (cost=0.00..2925.88 rows=112788 width=52) (actual time=2.802..241.367 rows=112740 loops=1)
              ->  Seq Scan on _hyper_2_304_chunk raw_data_csv_pb_phase1_152  (cost=0.00..591.40 rows=22440 width=52) (actual time=1.643..52.771 rows=22388 loops=1)
              ->  Seq Scan on _hyper_2_314_chunk raw_data_csv_pb_phase1_153  (cost=0.00..213.76 rows=7976 width=52) (actual time=2.898..21.844 rows=7957 loops=1)
              ->  Seq Scan on _hyper_2_315_chunk raw_data_csv_pb_phase1_154  (cost=0.00..14.30 rows=530 width=52) (actual time=1.141..3.260 rows=530 loops=1)
              ->  Seq Scan on _hyper_2_952_chunk raw_data_csv_pb_phase1_155  (cost=0.00..28.74 rows=1074 width=52) (actual time=0.169..3.214 rows=1074 loops=1)
        ->  Hash  (cost=151452.88..151452.88 rows=1541390 width=84) (actual time=5105.316..5105.316 rows=1541390 loops=1)
              Buckets: 524288  Batches: 8  Memory Usage: 23577kB
              ->  Hash Full Join  (cost=68832.22..151452.88 rows=1541390 width=84) (actual time=1563.513..4399.691 rows=1541390 loops=1)
                    Hash Cond: (raw_data_bbb_pi_ip."timestamp" = raw_data_bbb_calcs."timestamp")
                    ->  Append  (cost=0.00..38106.10 rows=1533540 width=56) (actual time=2.733..959.908 rows=1533540 loops=1)
                          ->  Seq Scan on _hyper_17_1270_chunk raw_data_bbb_pi_ip  (cost=0.00..100.59 rows=5759 width=56) (actual time=2.731..6.152 rows=5759 loops=1)
                          ->  Seq Scan on _hyper_17_1271_chunk raw_data_bbb_pi_ip_1  (cost=0.00..175.80 rows=10080 width=56) (actual time=0.324..4.900 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1272_chunk raw_data_bbb_pi_ip_2  (cost=0.00..175.80 rows=10080 width=56) (actual time=0.381..5.227 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1273_chunk raw_data_bbb_pi_ip_3  (cost=0.00..175.80 rows=10080 width=56) (actual time=0.322..4.885 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1274_chunk raw_data_bbb_pi_ip_4  (cost=0.00..177.80 rows=10080 width=56) (actual time=0.715..6.259 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1275_chunk raw_data_bbb_pi_ip_5  (cost=0.00..175.80 rows=10080 width=56) (actual time=0.321..5.618 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1276_chunk raw_data_bbb_pi_ip_6  (cost=0.00..175.80 rows=10080 width=56) (actual time=0.310..5.416 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1277_chunk raw_data_bbb_pi_ip_7  (cost=0.00..176.80 rows=10080 width=56) (actual time=0.415..5.339 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1278_chunk raw_data_bbb_pi_ip_8  (cost=0.00..176.80 rows=10080 width=56) (actual time=0.540..4.799 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1279_chunk raw_data_bbb_pi_ip_9  (cost=0.00..176.80 rows=10080 width=56) (actual time=0.746..5.057 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1280_chunk raw_data_bbb_pi_ip_10  (cost=0.00..176.80 rows=10080 width=56) (actual time=1.265..8.397 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1281_chunk raw_data_bbb_pi_ip_11  (cost=0.00..176.80 rows=10080 width=56) (actual time=1.152..11.479 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1282_chunk raw_data_bbb_pi_ip_12  (cost=0.00..176.80 rows=10080 width=56) (actual time=0.421..6.191 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1283_chunk raw_data_bbb_pi_ip_13  (cost=0.00..177.80 rows=10080 width=56) (actual time=0.352..5.995 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1284_chunk raw_data_bbb_pi_ip_14  (cost=0.00..176.80 rows=10080 width=56) (actual time=0.285..5.755 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1285_chunk raw_data_bbb_pi_ip_15  (cost=0.00..177.80 rows=10080 width=56) (actual time=0.281..3.874 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1286_chunk raw_data_bbb_pi_ip_16  (cost=0.00..177.80 rows=10080 width=56) (actual time=0.300..5.517 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1287_chunk raw_data_bbb_pi_ip_17  (cost=0.00..177.80 rows=10080 width=56) (actual time=0.372..5.171 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1288_chunk raw_data_bbb_pi_ip_18  (cost=0.00..177.80 rows=10080 width=56) (actual time=0.282..4.613 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1289_chunk raw_data_bbb_pi_ip_19  (cost=0.00..179.80 rows=10080 width=56) (actual time=0.326..5.181 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1290_chunk raw_data_bbb_pi_ip_20  (cost=0.00..181.80 rows=10080 width=56) (actual time=0.330..5.058 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1291_chunk raw_data_bbb_pi_ip_21  (cost=0.00..179.80 rows=10080 width=56) (actual time=0.314..4.388 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1292_chunk raw_data_bbb_pi_ip_22  (cost=0.00..180.80 rows=10080 width=56) (actual time=0.201..4.158 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1293_chunk raw_data_bbb_pi_ip_23  (cost=0.00..181.80 rows=10080 width=56) (actual time=1.221..7.342 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1294_chunk raw_data_bbb_pi_ip_24  (cost=0.00..180.80 rows=10080 width=56) (actual time=2.150..5.606 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1295_chunk raw_data_bbb_pi_ip_25  (cost=0.00..178.80 rows=10080 width=56) (actual time=0.293..3.614 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1296_chunk raw_data_bbb_pi_ip_26  (cost=0.00..178.80 rows=10080 width=56) (actual time=0.450..3.776 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1297_chunk raw_data_bbb_pi_ip_27  (cost=0.00..176.80 rows=10080 width=56) (actual time=0.344..3.619 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1298_chunk raw_data_bbb_pi_ip_28  (cost=0.00..179.80 rows=10080 width=56) (actual time=0.338..3.830 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1299_chunk raw_data_bbb_pi_ip_29  (cost=0.00..178.80 rows=10080 width=56) (actual time=0.405..4.006 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1300_chunk raw_data_bbb_pi_ip_30  (cost=0.00..178.80 rows=10080 width=56) (actual time=0.369..3.573 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1301_chunk raw_data_bbb_pi_ip_31  (cost=0.00..176.80 rows=10080 width=56) (actual time=0.407..3.478 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1302_chunk raw_data_bbb_pi_ip_32  (cost=0.00..180.80 rows=10080 width=56) (actual time=0.236..3.464 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1303_chunk raw_data_bbb_pi_ip_33  (cost=0.00..178.80 rows=10080 width=56) (actual time=0.436..3.572 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1304_chunk raw_data_bbb_pi_ip_34  (cost=0.00..178.80 rows=10080 width=56) (actual time=0.256..3.473 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1305_chunk raw_data_bbb_pi_ip_35  (cost=0.00..178.80 rows=10080 width=56) (actual time=0.275..4.253 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1306_chunk raw_data_bbb_pi_ip_36  (cost=0.00..175.80 rows=10080 width=56) (actual time=0.657..3.756 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1307_chunk raw_data_bbb_pi_ip_37  (cost=0.00..175.80 rows=10080 width=56) (actual time=0.264..3.377 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1308_chunk raw_data_bbb_pi_ip_38  (cost=0.00..178.80 rows=10080 width=56) (actual time=0.315..3.339 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1309_chunk raw_data_bbb_pi_ip_39  (cost=0.00..175.80 rows=10080 width=56) (actual time=0.226..3.313 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1310_chunk raw_data_bbb_pi_ip_40  (cost=0.00..176.80 rows=10080 width=56) (actual time=0.337..3.387 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1311_chunk raw_data_bbb_pi_ip_41  (cost=0.00..176.80 rows=10080 width=56) (actual time=0.228..3.286 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1312_chunk raw_data_bbb_pi_ip_42  (cost=0.00..175.80 rows=10080 width=56) (actual time=1.019..5.469 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1313_chunk raw_data_bbb_pi_ip_43  (cost=0.00..177.20 rows=10020 width=56) (actual time=1.240..6.299 rows=10020 loops=1)
                          ->  Seq Scan on _hyper_17_1314_chunk raw_data_bbb_pi_ip_44  (cost=0.00..177.80 rows=10080 width=56) (actual time=1.295..5.795 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1315_chunk raw_data_bbb_pi_ip_45  (cost=0.00..178.80 rows=10080 width=56) (actual time=1.378..5.641 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1316_chunk raw_data_bbb_pi_ip_46  (cost=0.00..177.80 rows=10080 width=56) (actual time=1.214..17.992 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1317_chunk raw_data_bbb_pi_ip_47  (cost=0.00..176.80 rows=10080 width=56) (actual time=1.588..8.905 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1318_chunk raw_data_bbb_pi_ip_48  (cost=0.00..174.80 rows=10080 width=56) (actual time=0.324..3.701 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1319_chunk raw_data_bbb_pi_ip_49  (cost=0.00..176.80 rows=10080 width=56) (actual time=1.143..5.824 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1320_chunk raw_data_bbb_pi_ip_50  (cost=0.00..176.80 rows=10080 width=56) (actual time=0.949..6.875 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1321_chunk raw_data_bbb_pi_ip_51  (cost=0.00..175.80 rows=10080 width=56) (actual time=0.953..5.795 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1322_chunk raw_data_bbb_pi_ip_52  (cost=0.00..173.80 rows=10080 width=56) (actual time=1.090..7.989 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1323_chunk raw_data_bbb_pi_ip_53  (cost=0.00..174.80 rows=10080 width=56) (actual time=0.320..3.910 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1324_chunk raw_data_bbb_pi_ip_54  (cost=0.00..174.80 rows=10080 width=56) (actual time=0.354..3.989 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1325_chunk raw_data_bbb_pi_ip_55  (cost=0.00..174.80 rows=10080 width=56) (actual time=0.367..3.724 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1326_chunk raw_data_bbb_pi_ip_56  (cost=0.00..176.80 rows=10080 width=56) (actual time=0.892..5.262 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1327_chunk raw_data_bbb_pi_ip_57  (cost=0.00..177.80 rows=10080 width=56) (actual time=0.930..6.857 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1328_chunk raw_data_bbb_pi_ip_58  (cost=0.00..179.80 rows=10080 width=56) (actual time=0.278..4.244 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1329_chunk raw_data_bbb_pi_ip_59  (cost=0.00..179.80 rows=10080 width=56) (actual time=0.337..5.155 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1330_chunk raw_data_bbb_pi_ip_60  (cost=0.00..180.80 rows=10080 width=56) (actual time=1.141..8.177 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1331_chunk raw_data_bbb_pi_ip_61  (cost=0.00..179.80 rows=10080 width=56) (actual time=1.993..6.604 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1332_chunk raw_data_bbb_pi_ip_62  (cost=0.00..179.80 rows=10080 width=56) (actual time=0.330..5.159 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1333_chunk raw_data_bbb_pi_ip_63  (cost=0.00..180.80 rows=10080 width=56) (actual time=0.364..4.998 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1334_chunk raw_data_bbb_pi_ip_64  (cost=0.00..185.80 rows=10080 width=56) (actual time=0.246..4.790 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1335_chunk raw_data_bbb_pi_ip_65  (cost=0.00..185.80 rows=10080 width=56) (actual time=0.374..4.568 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1336_chunk raw_data_bbb_pi_ip_66  (cost=0.00..185.80 rows=10080 width=56) (actual time=0.292..4.671 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1337_chunk raw_data_bbb_pi_ip_67  (cost=0.00..185.80 rows=10080 width=56) (actual time=0.309..4.837 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1338_chunk raw_data_bbb_pi_ip_68  (cost=0.00..185.80 rows=10080 width=56) (actual time=0.303..5.515 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1339_chunk raw_data_bbb_pi_ip_69  (cost=0.00..183.80 rows=10080 width=56) (actual time=0.884..6.189 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1340_chunk raw_data_bbb_pi_ip_70  (cost=0.00..178.80 rows=10080 width=56) (actual time=0.723..6.011 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1341_chunk raw_data_bbb_pi_ip_71  (cost=0.00..183.80 rows=10080 width=56) (actual time=0.348..5.825 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1342_chunk raw_data_bbb_pi_ip_72  (cost=0.00..190.80 rows=10080 width=56) (actual time=0.359..5.538 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1343_chunk raw_data_bbb_pi_ip_73  (cost=0.00..188.80 rows=10080 width=56) (actual time=0.352..5.414 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1344_chunk raw_data_bbb_pi_ip_74  (cost=0.00..186.80 rows=10080 width=56) (actual time=0.302..5.174 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1345_chunk raw_data_bbb_pi_ip_75  (cost=0.00..186.80 rows=10080 width=56) (actual time=0.286..5.619 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1346_chunk raw_data_bbb_pi_ip_76  (cost=0.00..186.80 rows=10080 width=56) (actual time=0.343..5.340 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1347_chunk raw_data_bbb_pi_ip_77  (cost=0.00..185.80 rows=10080 width=56) (actual time=0.445..6.335 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1348_chunk raw_data_bbb_pi_ip_78  (cost=0.00..186.80 rows=10080 width=56) (actual time=0.375..5.531 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1349_chunk raw_data_bbb_pi_ip_79  (cost=0.00..186.80 rows=10080 width=56) (actual time=1.064..8.204 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1350_chunk raw_data_bbb_pi_ip_80  (cost=0.00..186.80 rows=10080 width=56) (actual time=0.320..6.446 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1351_chunk raw_data_bbb_pi_ip_81  (cost=0.00..186.80 rows=10080 width=56) (actual time=0.380..5.716 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1352_chunk raw_data_bbb_pi_ip_82  (cost=0.00..200.80 rows=10080 width=56) (actual time=0.416..6.301 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1353_chunk raw_data_bbb_pi_ip_83  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.297..7.128 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1354_chunk raw_data_bbb_pi_ip_84  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.282..7.119 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1355_chunk raw_data_bbb_pi_ip_85  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.300..6.400 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1356_chunk raw_data_bbb_pi_ip_86  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.340..5.350 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1357_chunk raw_data_bbb_pi_ip_87  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.286..5.895 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1358_chunk raw_data_bbb_pi_ip_88  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.357..5.285 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1359_chunk raw_data_bbb_pi_ip_89  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.225..4.738 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1360_chunk raw_data_bbb_pi_ip_90  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.229..5.095 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1361_chunk raw_data_bbb_pi_ip_91  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.278..5.127 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1362_chunk raw_data_bbb_pi_ip_92  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.265..5.039 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1363_chunk raw_data_bbb_pi_ip_93  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.790..6.274 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1364_chunk raw_data_bbb_pi_ip_94  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.232..4.964 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1365_chunk raw_data_bbb_pi_ip_95  (cost=0.00..224.20 rows=10020 width=56) (actual time=0.236..4.380 rows=10020 loops=1)
                          ->  Seq Scan on _hyper_17_1366_chunk raw_data_bbb_pi_ip_96  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.231..5.106 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1367_chunk raw_data_bbb_pi_ip_97  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.234..4.388 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1368_chunk raw_data_bbb_pi_ip_98  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.225..4.946 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1369_chunk raw_data_bbb_pi_ip_99  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.279..5.039 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1370_chunk raw_data_bbb_pi_ip_100  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.537..4.757 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1371_chunk raw_data_bbb_pi_ip_101  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.250..5.155 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1372_chunk raw_data_bbb_pi_ip_102  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.255..5.557 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1373_chunk raw_data_bbb_pi_ip_103  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.244..4.372 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1374_chunk raw_data_bbb_pi_ip_104  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.222..4.677 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1375_chunk raw_data_bbb_pi_ip_105  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.221..4.421 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1376_chunk raw_data_bbb_pi_ip_106  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.743..7.897 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1377_chunk raw_data_bbb_pi_ip_107  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.279..4.952 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1378_chunk raw_data_bbb_pi_ip_108  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.254..5.451 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1379_chunk raw_data_bbb_pi_ip_109  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.287..5.098 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1380_chunk raw_data_bbb_pi_ip_110  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.288..5.198 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1381_chunk raw_data_bbb_pi_ip_111  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.387..5.483 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1382_chunk raw_data_bbb_pi_ip_112  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.277..4.821 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1383_chunk raw_data_bbb_pi_ip_113  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.242..6.293 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1384_chunk raw_data_bbb_pi_ip_114  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.341..6.466 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1385_chunk raw_data_bbb_pi_ip_115  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.242..5.925 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1386_chunk raw_data_bbb_pi_ip_116  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.248..6.247 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1387_chunk raw_data_bbb_pi_ip_117  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.279..5.193 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1388_chunk raw_data_bbb_pi_ip_118  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.223..4.248 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1389_chunk raw_data_bbb_pi_ip_119  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.713..6.020 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1390_chunk raw_data_bbb_pi_ip_120  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.229..5.201 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1391_chunk raw_data_bbb_pi_ip_121  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.381..5.989 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1392_chunk raw_data_bbb_pi_ip_122  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.355..5.113 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1393_chunk raw_data_bbb_pi_ip_123  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.284..6.442 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1394_chunk raw_data_bbb_pi_ip_124  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.233..4.798 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1395_chunk raw_data_bbb_pi_ip_125  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.207..5.443 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1396_chunk raw_data_bbb_pi_ip_126  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.806..6.269 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1397_chunk raw_data_bbb_pi_ip_127  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.770..6.243 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1398_chunk raw_data_bbb_pi_ip_128  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.643..5.397 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1399_chunk raw_data_bbb_pi_ip_129  (cost=0.00..225.80 rows=10080 width=56) (actual time=2.829..10.581 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1400_chunk raw_data_bbb_pi_ip_130  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.428..5.156 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1401_chunk raw_data_bbb_pi_ip_131  (cost=0.00..225.80 rows=10080 width=56) (actual time=1.148..8.758 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1402_chunk raw_data_bbb_pi_ip_132  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.250..5.731 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1403_chunk raw_data_bbb_pi_ip_133  (cost=0.00..225.80 rows=10080 width=56) (actual time=2.838..10.951 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1404_chunk raw_data_bbb_pi_ip_134  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.258..5.332 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1405_chunk raw_data_bbb_pi_ip_135  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.268..4.632 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1406_chunk raw_data_bbb_pi_ip_136  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.258..4.575 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1407_chunk raw_data_bbb_pi_ip_137  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.292..4.668 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1408_chunk raw_data_bbb_pi_ip_138  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.175..5.202 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1409_chunk raw_data_bbb_pi_ip_139  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.167..4.464 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1410_chunk raw_data_bbb_pi_ip_140  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.162..4.422 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1411_chunk raw_data_bbb_pi_ip_141  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.907..8.924 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1412_chunk raw_data_bbb_pi_ip_142  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.228..5.950 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1413_chunk raw_data_bbb_pi_ip_143  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.252..4.660 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1414_chunk raw_data_bbb_pi_ip_144  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.223..5.469 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1415_chunk raw_data_bbb_pi_ip_145  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.227..5.034 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1416_chunk raw_data_bbb_pi_ip_146  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.343..5.736 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1417_chunk raw_data_bbb_pi_ip_147  (cost=0.00..224.20 rows=10020 width=56) (actual time=0.833..6.970 rows=10020 loops=1)
                          ->  Seq Scan on _hyper_17_1418_chunk raw_data_bbb_pi_ip_148  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.984..8.315 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1419_chunk raw_data_bbb_pi_ip_149  (cost=0.00..225.80 rows=10080 width=56) (actual time=0.286..5.165 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1420_chunk raw_data_bbb_pi_ip_150  (cost=0.00..202.80 rows=10080 width=56) (actual time=0.290..4.319 rows=10080 loops=1)
                          ->  Seq Scan on _hyper_17_1421_chunk raw_data_bbb_pi_ip_151  (cost=0.00..163.21 rows=9821 width=56) (actual time=0.253..3.644 rows=9821 loops=1)
                          ->  Seq Scan on _hyper_17_1422_chunk raw_data_bbb_pi_ip_152  (cost=0.00..101.40 rows=6140 width=56) (actual time=0.411..2.618 rows=6140 loops=1)
                    ->  Hash  (cost=39027.85..39027.85 rows=1541390 width=28) (actual time=1556.645..1556.647 rows=1541390 loops=1)
                          Buckets: 524288  Batches: 4  Memory Usage: 28146kB
                          ->  Append  (cost=0.00..39027.85 rows=1541390 width=28) (actual time=1.428..983.803 rows=1541390 loops=1)
                                ->  Seq Scan on _hyper_15_953_chunk raw_data_bbb_calcs  (cost=0.00..117.59 rows=5759 width=28) (actual time=1.423..8.559 rows=5759 loops=1)
                                ->  Seq Scan on _hyper_15_954_chunk raw_data_bbb_calcs_1  (cost=0.00..204.80 rows=10080 width=28) (actual time=1.004..6.718 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_955_chunk raw_data_bbb_calcs_2  (cost=0.00..204.80 rows=10080 width=28) (actual time=1.197..7.986 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_956_chunk raw_data_bbb_calcs_3  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.300..5.422 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_957_chunk raw_data_bbb_calcs_4  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.309..5.524 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_958_chunk raw_data_bbb_calcs_5  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.462..4.488 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_959_chunk raw_data_bbb_calcs_6  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.335..4.500 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_960_chunk raw_data_bbb_calcs_7  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.282..5.070 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_961_chunk raw_data_bbb_calcs_8  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.306..4.542 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_962_chunk raw_data_bbb_calcs_9  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.316..4.520 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_963_chunk raw_data_bbb_calcs_10  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.264..4.370 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_964_chunk raw_data_bbb_calcs_11  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.237..4.236 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_965_chunk raw_data_bbb_calcs_12  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.252..3.884 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_966_chunk raw_data_bbb_calcs_13  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.215..3.692 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_967_chunk raw_data_bbb_calcs_14  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.275..4.288 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_968_chunk raw_data_bbb_calcs_15  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.274..5.708 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_969_chunk raw_data_bbb_calcs_16  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.263..4.776 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_970_chunk raw_data_bbb_calcs_17  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.305..4.406 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_971_chunk raw_data_bbb_calcs_18  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.291..4.918 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_972_chunk raw_data_bbb_calcs_19  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.294..4.393 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_973_chunk raw_data_bbb_calcs_20  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.295..5.073 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_974_chunk raw_data_bbb_calcs_21  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.640..5.180 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_975_chunk raw_data_bbb_calcs_22  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.784..5.585 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_976_chunk raw_data_bbb_calcs_23  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.258..4.268 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_977_chunk raw_data_bbb_calcs_24  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.230..6.501 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_978_chunk raw_data_bbb_calcs_25  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.711..4.809 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_979_chunk raw_data_bbb_calcs_26  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.274..4.299 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_980_chunk raw_data_bbb_calcs_27  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.209..4.143 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_981_chunk raw_data_bbb_calcs_28  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.234..4.738 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_982_chunk raw_data_bbb_calcs_29  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.683..5.648 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_983_chunk raw_data_bbb_calcs_30  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.964..8.564 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_984_chunk raw_data_bbb_calcs_31  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.234..4.596 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_985_chunk raw_data_bbb_calcs_32  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.278..3.566 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_986_chunk raw_data_bbb_calcs_33  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.287..3.431 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_987_chunk raw_data_bbb_calcs_34  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.238..3.415 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_988_chunk raw_data_bbb_calcs_35  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.260..3.539 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_989_chunk raw_data_bbb_calcs_36  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.181..4.144 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_990_chunk raw_data_bbb_calcs_37  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.402..5.980 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_991_chunk raw_data_bbb_calcs_38  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.466..5.394 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_992_chunk raw_data_bbb_calcs_39  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.249..4.095 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_993_chunk raw_data_bbb_calcs_40  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.295..4.103 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_994_chunk raw_data_bbb_calcs_41  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.332..4.842 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_995_chunk raw_data_bbb_calcs_42  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.321..4.390 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_996_chunk raw_data_bbb_calcs_43  (cost=0.00..204.21 rows=10021 width=28) (actual time=0.252..3.686 rows=10021 loops=1)
                                ->  Seq Scan on _hyper_15_997_chunk raw_data_bbb_calcs_44  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.239..4.359 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_998_chunk raw_data_bbb_calcs_45  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.244..4.155 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_999_chunk raw_data_bbb_calcs_46  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.208..3.808 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1000_chunk raw_data_bbb_calcs_47  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.819..9.006 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1001_chunk raw_data_bbb_calcs_48  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.307..4.587 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1002_chunk raw_data_bbb_calcs_49  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.224..3.652 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1003_chunk raw_data_bbb_calcs_50  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.239..3.626 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1004_chunk raw_data_bbb_calcs_51  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.267..3.723 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1005_chunk raw_data_bbb_calcs_52  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.187..3.908 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1006_chunk raw_data_bbb_calcs_53  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.280..4.046 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1007_chunk raw_data_bbb_calcs_54  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.307..4.724 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1008_chunk raw_data_bbb_calcs_55  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.217..4.007 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1009_chunk raw_data_bbb_calcs_56  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.255..3.556 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1010_chunk raw_data_bbb_calcs_57  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.796..4.227 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1011_chunk raw_data_bbb_calcs_58  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.276..4.512 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1012_chunk raw_data_bbb_calcs_59  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.248..4.616 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1013_chunk raw_data_bbb_calcs_60  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.193..4.278 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1014_chunk raw_data_bbb_calcs_61  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.236..6.136 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1015_chunk raw_data_bbb_calcs_62  (cost=0.00..204.80 rows=10080 width=28) (actual time=2.548..14.939 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1016_chunk raw_data_bbb_calcs_63  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.560..4.020 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1017_chunk raw_data_bbb_calcs_64  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.213..3.670 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1018_chunk raw_data_bbb_calcs_65  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.264..4.175 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1019_chunk raw_data_bbb_calcs_66  (cost=0.00..204.80 rows=10080 width=28) (actual time=1.194..12.410 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1020_chunk raw_data_bbb_calcs_67  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.313..3.731 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1021_chunk raw_data_bbb_calcs_68  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.235..3.548 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1022_chunk raw_data_bbb_calcs_69  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.291..3.856 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1023_chunk raw_data_bbb_calcs_70  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.342..4.907 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1024_chunk raw_data_bbb_calcs_71  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.317..3.665 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1025_chunk raw_data_bbb_calcs_72  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.291..4.252 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1026_chunk raw_data_bbb_calcs_73  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.230..4.695 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1027_chunk raw_data_bbb_calcs_74  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.212..3.443 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1028_chunk raw_data_bbb_calcs_75  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.278..3.687 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1029_chunk raw_data_bbb_calcs_76  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.220..3.964 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1030_chunk raw_data_bbb_calcs_77  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.218..3.988 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1031_chunk raw_data_bbb_calcs_78  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.853..5.128 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1032_chunk raw_data_bbb_calcs_79  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.283..4.947 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1033_chunk raw_data_bbb_calcs_80  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.994..10.499 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1034_chunk raw_data_bbb_calcs_81  (cost=0.00..204.80 rows=10080 width=28) (actual time=3.114..6.629 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1035_chunk raw_data_bbb_calcs_82  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.201..3.504 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1036_chunk raw_data_bbb_calcs_83  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.438..4.195 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1037_chunk raw_data_bbb_calcs_84  (cost=0.00..204.80 rows=10080 width=28) (actual time=1.122..8.254 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1038_chunk raw_data_bbb_calcs_85  (cost=0.00..204.80 rows=10080 width=28) (actual time=3.210..8.331 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1039_chunk raw_data_bbb_calcs_86  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.260..4.412 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1040_chunk raw_data_bbb_calcs_87  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.287..4.550 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1041_chunk raw_data_bbb_calcs_88  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.197..3.880 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1042_chunk raw_data_bbb_calcs_89  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.276..4.624 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1043_chunk raw_data_bbb_calcs_90  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.195..4.457 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1044_chunk raw_data_bbb_calcs_91  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.214..4.183 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1045_chunk raw_data_bbb_calcs_92  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.209..4.447 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1046_chunk raw_data_bbb_calcs_93  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.826..5.219 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1047_chunk raw_data_bbb_calcs_94  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.228..5.029 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1048_chunk raw_data_bbb_calcs_95  (cost=0.00..204.21 rows=10021 width=28) (actual time=0.225..4.047 rows=10021 loops=1)
                                ->  Seq Scan on _hyper_15_1049_chunk raw_data_bbb_calcs_96  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.242..3.314 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1050_chunk raw_data_bbb_calcs_97  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.849..5.358 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1051_chunk raw_data_bbb_calcs_98  (cost=0.00..204.80 rows=10080 width=28) (actual time=1.031..10.812 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1052_chunk raw_data_bbb_calcs_99  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.328..4.877 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1053_chunk raw_data_bbb_calcs_100  (cost=0.00..204.80 rows=10080 width=28) (actual time=1.182..10.549 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1054_chunk raw_data_bbb_calcs_101  (cost=0.00..204.80 rows=10080 width=28) (actual time=1.851..6.246 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1055_chunk raw_data_bbb_calcs_102  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.350..4.501 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1056_chunk raw_data_bbb_calcs_103  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.678..5.168 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1057_chunk raw_data_bbb_calcs_104  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.252..5.254 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1058_chunk raw_data_bbb_calcs_105  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.276..5.302 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1059_chunk raw_data_bbb_calcs_106  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.354..8.623 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1060_chunk raw_data_bbb_calcs_107  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.501..6.269 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1061_chunk raw_data_bbb_calcs_108  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.364..6.547 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1062_chunk raw_data_bbb_calcs_109  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.282..5.918 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1063_chunk raw_data_bbb_calcs_110  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.791..6.498 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1064_chunk raw_data_bbb_calcs_111  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.430..5.792 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1065_chunk raw_data_bbb_calcs_112  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.356..5.690 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1066_chunk raw_data_bbb_calcs_113  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.371..6.505 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1067_chunk raw_data_bbb_calcs_114  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.331..6.841 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1068_chunk raw_data_bbb_calcs_115  (cost=0.00..204.80 rows=10080 width=28) (actual time=1.095..13.457 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1069_chunk raw_data_bbb_calcs_116  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.366..6.072 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1070_chunk raw_data_bbb_calcs_117  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.371..5.585 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1071_chunk raw_data_bbb_calcs_118  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.341..5.864 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1072_chunk raw_data_bbb_calcs_119  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.345..7.565 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1073_chunk raw_data_bbb_calcs_120  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.355..5.767 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1074_chunk raw_data_bbb_calcs_121  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.305..5.509 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1075_chunk raw_data_bbb_calcs_122  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.209..5.577 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1076_chunk raw_data_bbb_calcs_123  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.288..5.658 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1077_chunk raw_data_bbb_calcs_124  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.388..5.795 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1078_chunk raw_data_bbb_calcs_125  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.354..6.644 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1079_chunk raw_data_bbb_calcs_126  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.317..6.193 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1080_chunk raw_data_bbb_calcs_127  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.353..5.866 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1081_chunk raw_data_bbb_calcs_128  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.347..5.696 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1082_chunk raw_data_bbb_calcs_129  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.447..5.825 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1083_chunk raw_data_bbb_calcs_130  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.294..5.392 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1084_chunk raw_data_bbb_calcs_131  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.975..12.565 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1085_chunk raw_data_bbb_calcs_132  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.400..6.543 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1086_chunk raw_data_bbb_calcs_133  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.395..6.186 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1087_chunk raw_data_bbb_calcs_134  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.258..6.382 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1088_chunk raw_data_bbb_calcs_135  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.314..5.711 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1089_chunk raw_data_bbb_calcs_136  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.293..5.761 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1090_chunk raw_data_bbb_calcs_137  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.441..6.040 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1091_chunk raw_data_bbb_calcs_138  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.340..6.328 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1092_chunk raw_data_bbb_calcs_139  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.399..6.348 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1093_chunk raw_data_bbb_calcs_140  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.292..6.762 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1094_chunk raw_data_bbb_calcs_141  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.248..6.999 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1095_chunk raw_data_bbb_calcs_142  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.305..6.035 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1096_chunk raw_data_bbb_calcs_143  (cost=0.00..204.80 rows=10080 width=28) (actual time=1.170..9.135 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1097_chunk raw_data_bbb_calcs_144  (cost=0.00..204.80 rows=10080 width=28) (actual time=2.893..8.232 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1098_chunk raw_data_bbb_calcs_145  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.305..5.178 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1099_chunk raw_data_bbb_calcs_146  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.312..5.599 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1100_chunk raw_data_bbb_calcs_147  (cost=0.00..204.21 rows=10021 width=28) (actual time=0.298..4.888 rows=10021 loops=1)
                                ->  Seq Scan on _hyper_15_1101_chunk raw_data_bbb_calcs_148  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.226..4.947 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1102_chunk raw_data_bbb_calcs_149  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.356..5.880 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1103_chunk raw_data_bbb_calcs_150  (cost=0.00..204.80 rows=10080 width=28) (actual time=0.248..6.816 rows=10080 loops=1)
                                ->  Seq Scan on _hyper_15_1104_chunk raw_data_bbb_calcs_151  (cost=0.00..204.49 rows=10049 width=28) (actual time=1.094..10.563 rows=10049 loops=1)
                                ->  Seq Scan on _hyper_15_1105_chunk raw_data_bbb_calcs_152  (cost=0.00..184.70 rows=9070 width=28) (actual time=14.490..20.819 rows=9070 loops=1)
                                ->  Seq Scan on _hyper_15_1106_chunk raw_data_bbb_calcs_153  (cost=0.00..92.46 rows=4546 width=28) (actual time=0.338..2.843 rows=4546 loops=1)
                                ->  Seq Scan on _hyper_15_1107_chunk raw_data_bbb_calcs_154  (cost=0.00..3.43 rows=143 width=28) (actual time=1.128..1.190 rows=143 loops=1)
Planning Time: 296677.021 ms
Execution Time: 804619.472 ms

@feikesteenbergen
Copy link
Member

@cloud-rocket thanks for the plan

If I understand you correctly, the problem does not occur when running the sole select?
Does it only occur when creating the materialized view?

I'm going to see if I can reproduce something like that as well to see if we can find out what is causing the memory increase.

@cloud-rocket
Copy link
Author

It's a good question. For the obvious reason of returning millions of records, I cannot run this select on its own. But I will try to run EXPLAIN ANALYZE on CREATE MATERIALIZED VIEW.

I actually never thought there might be a difference between creating a view with select and just running a select....

@cloud-rocket
Copy link
Author

But we do have the same out memory issues since 0.x versions....

@cloud-rocket
Copy link
Author

It looks like the EXPLAIN ANALYZE query on CREATE MATERIALIZED VIEW is not finishing also

@feikesteenbergen
Copy link
Member

@cloud-rocket good news and bad news.

The good news is that I'm able to reproduce this issue. It is however not Timescale specific, it seems to be a PostgreSQL issue when doing an OUTER JOIN involving many partitions. The following needs to be true:

  • a FULL OUTER JOIN needs to be done, it does not trigger on a mere LEFT JOIN
  • many partitions (thousands) need to be involved

Reproducing testcase:

CREATE TABLE buggy(
    inserted timestamptz not null
)
PARTITION BY RANGE (inserted);

-- Create some partitions
DO $BODY$
DECLARE
    partname text;
    start date := date_trunc('week', '1999-12-31'::date);
BEGIN
    FOR i IN 0..1000 LOOP
        partname := format('buggy_%s', to_char(start, 'IYYYIW'));
        EXECUTE format( 'CREATE TABLE %I PARTITION OF %I FOR VALUES FROM (%L) TO (%L)',
                        partname,
                        'buggy',
                        start,
                        start + 7
                );
        start := start + 7;
    END LOOP;
END;
$BODY$;

-- This works fine
EXPLAIN
SELECT
    inserted
FROM
    buggy b1
LEFT JOIN
    buggy b2 USING (inserted)
LEFT JOIN
    buggy b3 USING (inserted)
LEFT JOIN
    buggy b4 USING (inserted)
;

/*
This will either do the following:
- `ERROR:  53200: out of memory` for systems with overcommit disabled, or
- an out-of-memory kill (kernel)
- rescheduling of the pod (k8s)
*/
EXPLAIN
SELECT
    inserted
FROM
    buggy b1
FULL OUTER JOIN
    buggy b2 USING (inserted)
FULL OUTER JOIN
    buggy b3 USING (inserted)
FULL OUTER JOIN
    buggy b4 USING (inserted)
;

I'll do a bit more of debugging to isolate the issue, but I think we'll report this upstream to the PostgreSQL bugs mailing list and once the bug# is known, we'll close this issue with a link to the discussion on the PostgreSQL mailing list.

@feikesteenbergen
Copy link
Member

@cloud-rocket as only FULL OUTER JOINS seem to trigger this issue, you might be able to work around it if you'd only need a LEFT OUTER JOIN. It will be on you to judge however if this is the case.

@cloud-rocket
Copy link
Author

cloud-rocket commented Jun 11, 2019

Thank you @feikesteenbergen.
I was actually thinking about how to get rid of the FULL OUTER JOINS. But in our case - I have 2-3 tables with timestamp indices, but they are not aligned. I need a view with data and timestamps from all tables.
I was thinking to somehow create an index from all the tables and LEFT JOIN other tables to it. But I am still not sure how to do it properly.
Any idea?
Thanks!

@feikesteenbergen
Copy link
Member

I was thinking to somehow create an index from all the tables and LEFT JOIN other tables to it. But I am still not sure how to do it properly.
Any idea?

It depends. There is no such thing as an index for multiple tables in PostgreSQL, but you could create a single table with 1 column which contains these values and put an index on that.

The other option is to do a bit of the planning yourself, e.g. do 1 full outer join in a CTE, and do another one level lower. This will force the planner into a specific order of execution, which normally is something you want to avoid, but here it may be useful.

For example, this query causes an OOM on my machine:

EXPLAIN
SELECT
    inserted
FROM
    buggy b1
FULL OUTER JOIN
    buggy b2 USING (inserted)
FULL OUTER JOIN (
    buggy b3 USING (inserted)
FULL OUTER JOIN
    buggy b4 USING (inserted)
)
;

But this one doesn't:

EXPLAIN
WITH my_cte AS (
    SELECT
        inserted
    FROM
        buggy b1
    FULL OUTER JOIN
        buggy b2 USING (inserted)

)
SELECT
    inserted
FROM
    my_cte -- contains b1 and b2
FULL OUTER JOIN
    buggy b3 USING (inserted)
FULL OUTER JOIN
    buggy b4 USING (inserted);

The above approach will require that my_cte be materialized - so a lot of memory or temp files may be required. Perhaps a better approach would be to get the aggregates per table first and join the aggregates only, e.g.:

```sql
WITH a AS (
    SELECT
        time_bucket('5 minute', timestamp) AS tbucket,
        ...
    FROM
        bbb_23_calcs
    GROUP BY
        time_bucket('5 minute', timestamp)
), b AS (
    SELECT
        time_bucket('5 minute', timestamp) AS tbucket,
        ...
    FROM
        bbb_23_22_ip
    GROUP BY
        time_bucket('5 minute', timestamp)
, [...]
SELECT
    tbucket,
    a.col1,
    b.col2,
    coalesce(a.col3, b.col3)
FROM
    a
FULL OUTER JOIN
    b USING (tbucket)
ORDER BY
    tbucket;

@feikesteenbergen
Copy link
Member

I raised this as a bug on the PostgreSQL mailing list here:
https://www.postgresql.org/message-id/flat/15847-ea3734094bf8ae61%40postgresql.org

@davidkohn88 davidkohn88 changed the title TimescaleDB runs out of memory for full outer join queries TimescaleDB runs out of memory for full outer join queries involving many partitions Jun 12, 2019
@davidkohn88 davidkohn88 changed the title TimescaleDB runs out of memory for full outer join queries involving many partitions OOM on full outer join queries involving many partitions Jun 12, 2019
@feikesteenbergen
Copy link
Member

A patch was added to PostgreSQL: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=d25ea0127598dd0ad27a029215172f396fbd1009
that will fix this for the (upcoming) PostgreSQL 12 release.

I've done a few tests with and without this patch, a 3-way full outer join with 1000 partiitons each:

EXPLAIN (ANALYZE)
SELECT
inserted
FROM
buggy b1
FULL OUTER JOIN
buggy b2 USING (inserted)
FULL OUTER JOIN
buggy b3 USING (inserted)
;

Before:

[...]
Planning Time: 23863.309 ms
Execution Time: 16.939 ms
(3026 rows)

After:

[...]
Planning Time: 76.111 ms
Execution Time: 10.615 ms
(3026 rows)

The 4-way join is now planned within reasonable enough time for a materialized view/continuous aggregate, and it does not consume huge amounts of memory:

[...]
 Planning Time: 213.833 ms
 Execution Time: 22.932 ms
(4037 rows)

There won't be a backpatch for PostgreSQL < 12, so for current releases the only way to make this work is to use a workaround.

It will take some time for Timescale to be available on 12, but as soon as it is this problem should not exist anymore.

We can close the issue, as there is nothing we can do from our side to make this work better before PostgreSQL 12 is released.

@cloud-rocket
Copy link
Author

THanks @feikesteenbergen!! Great job!!

@dianasaur323
Copy link
Contributor

Closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants