should be it

This commit is contained in:
2025-10-24 19:21:19 -05:00
parent a4b23fc57c
commit f09560c7b1
14047 changed files with 3161551 additions and 1 deletions

View File

@@ -0,0 +1,27 @@
# name: benchmark/micro/update/update_with_join.benchmark
# description: updated table scan should be on probe side
# group: [update]
load
create table t(ts_start timestamptz, ts_stop timestamptz, id text);
with dates as (
select '2023-01-01'::timestamp + i * interval '1 DAY' as x
from generate_series(0, 999) as t(i)
),
ids as (
select 'id_' || lpad(i::text, 4, '0') as y
from generate_series(0, 999) as t(i)
)
insert into t(ts_start, ts_stop, id)
select d.x, null, i.y from dates d, ids i;
run
update t as this
set ts_stop = next.ts_start_next
from (
select id, ts_start, LEAD(ts_start) over (partition by id order by ts_start)
as ts_start_next
from t
) as next
where this.id=next.id and this.ts_start=next.ts_start;