promscale
promscale copied to clipboard
QueryRange sampling performance
Hi, we observed the performance decrease with increasing data volume (time range), regardless of the "step" (in QueryRange API) we set. We took one query that ran in the backend, it looks like this:
SELECT series.labels, result.time_array, result.value_array FROM "prom_data_series"."metric_x" series INNER JOIN ( SELECT series_id, array_agg(time) as time_array, array_agg(value) as value_array FROM ( SELECT series_id, time, "value" as value FROM "prom_data"."metric_x" metric WHERE time >= '2020-09-11T08:01:18.096Z' AND time <= '2022-09-12T08:01:18.096Z' ORDER BY series_id, time ) as time_ordered_rows GROUP BY series_id ) as result ON (result.value_array is not null AND result.series_id = series.id)
can someone explain whether sampling operator is pushed down in the execution? And, how do you optimize the performance of "long range" query? (We are ok with down sampling if needed) Thanks!
Do you have promscale_extension installed?
I recall Promscale use a pushdown _prom_ext.vector_selector
func in SQL query, which returns only stepped samples, thereby making it efficient on network.
Do you have promscale_extension installed?
I recall Promscale use a pushdown
_prom_ext.vector_selector
func in SQL query, which returns only stepped samples, thereby making it efficient on network.
yes, we do have extension, otherwise promsale will directly fail instead of sending out query to tsdb
also, we run explain for the above query, it looks like this
Click me
Hash Join (cost=19880.34..20085.84 rows=199 width=96)
Hash Cond: (metric_1.series_id = series.id)
-> GroupAggregate (cost=19847.39..20050.37 rows=199 width=72)
Group Key: metric_1.series_id
Filter: (array_agg(metric_1.value) IS NOT NULL)
-> Sort (cost=19847.39..19872.39 rows=9999 width=24)
Sort Key: metric_1.series_id, metric_1."time"
-> Append (cost=0.00..19183.08 rows=9999 width=24)
-> Seq Scan on _hyper_47_20_chunk metric_1 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_22_chunk metric_2 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_140_chunk metric_3 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_1920_chunk metric_4 (cost=0.00..3.35 rows=154 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_1921_chunk metric_5 (cost=0.00..3.35 rows=155 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_1942_chunk metric_6 (cost=0.00..3.35 rows=155 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_1953_chunk metric_7 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_1966_chunk metric_8 (cost=0.00..3.35 rows=155 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_1977_chunk metric_9 (cost=0.00..3.35 rows=155 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_1991_chunk metric_10 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_2013_chunk metric_11 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_2032_chunk metric_12 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_2049_chunk metric_13 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_2063_chunk metric_14 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_2076_chunk metric_15 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_2089_chunk metric_16 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_2222_chunk metric_17 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_2397_chunk metric_18 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_2842_chunk metric_19 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_3275_chunk metric_20 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_3372_chunk metric_21 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_3468_chunk metric_22 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_3552_chunk metric_23 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_3651_chunk metric_24 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_3813_chunk metric_25 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_3913_chunk metric_26 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4005_chunk metric_27 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4103_chunk metric_28 (cost=0.00..3.35 rows=157 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4224_chunk metric_29 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4261_chunk metric_30 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4269_chunk metric_31 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4274_chunk metric_32 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4274_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4279_chunk metric_33 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4279_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4284_chunk metric_34 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4288_chunk metric_35 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4293_chunk metric_36 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4293_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4297_chunk metric_37 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4302_chunk metric_38 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4302_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4307_chunk metric_39 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4307_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4311_chunk metric_40 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4317_chunk metric_41 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4317_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4322_chunk metric_42 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4322_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4326_chunk metric_43 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4334_chunk metric_44 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4339_chunk metric_45 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4344_chunk metric_46 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4344_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4348_chunk metric_47 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4352_chunk metric_48 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4357_chunk metric_49 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4362_chunk metric_50 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4367_chunk metric_51 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4372_chunk metric_52 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4377_chunk metric_53 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4377_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4382_chunk metric_54 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4382_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4389_chunk metric_55 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4394_chunk metric_56 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4399_chunk metric_57 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4403_chunk metric_58 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4403_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4407_chunk metric_59 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4407_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4412_chunk metric_60 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4412_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4417_chunk metric_61 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4417_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4422_chunk metric_62 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4422_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4427_chunk metric_63 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4427_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4435_chunk metric_64 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4435_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4439_chunk metric_65 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4439_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4444_chunk metric_66 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4444_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4449_chunk metric_67 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4454_chunk metric_68 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4454_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4458_chunk metric_69 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4458_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4463_chunk metric_70 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4463_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4467_chunk metric_71 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4467_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4472_chunk metric_72 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4472_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4477_chunk metric_73 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4477_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4482_chunk metric_74 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4482_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4486_chunk metric_75 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4491_chunk metric_76 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4491_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4497_chunk metric_77 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4504_chunk metric_78 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4504_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4509_chunk metric_79 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4509_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4513_chunk metric_80 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4513_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4518_chunk metric_81 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4518_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4522_chunk metric_82 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4522_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4527_chunk metric_83 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4527_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4531_chunk metric_84 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4531_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4537_chunk metric_85 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4537_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4541_chunk metric_86 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4541_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4547_chunk metric_87 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4547_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4552_chunk metric_88 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4552_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4560_chunk metric_89 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4560_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4564_chunk metric_90 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4564_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4568_chunk metric_91 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4568_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Seq Scan on _hyper_47_4573_chunk metric_92 (cost=0.00..3.35 rows=1 width=24)
Filter: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4577_chunk metric_93 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4577_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4582_chunk metric_94 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4582_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4587_chunk metric_95 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4587_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4592_chunk metric_96 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4592_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4597_chunk metric_97 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4597_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4602_chunk metric_98 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4602_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4607_chunk metric_99 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4607_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
Index Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Heap Scan on _hyper_47_4615_chunk metric_100 (cost=18.05..24.31 rows=8 width=24)
Recheck Cond: (("time" >= '2020-09-11 08:01:18.096+00'::timestamp with time zone) AND ("time" <= '2022-09-12 08:01:18.096+00'::timestamp with time zone))
-> Bitmap Index Scan on _hyper_47_4615_chunk_data_series_id_time_19 (cost=0.00..18.05 rows=8 width=0)
...
It seems a bug to me that connector is not using that function.
might because this is an aggregation query? for simple metric query we do see _prom_ext.vector_selector
@zfy0701 can you get the PromQL query corresponding to this?
@zfy0701 can you get the PromQL query corresponding to this?
like this:
end=1663186741.9880474&query=sum%28sum_over_time%28metric_gRmfjPho_deposit%5B1d%5D%29%29&start=1600114741.9880455&step=63072
Ahh this is an aggregate sum_over_time, and aggregates cannot be handled by _prom_ext.vector_selector
. We have to write code to push down each aggregate individually and we haven't yet pushed down the *_over_time
aggregates.
Let me talk to the team about improving this, I'll get back to you with a timeline.