31ece2e99a
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 lines
513 B
SQL
14 lines
513 B
SQL
create table if not exists candles_2026_04
|
|
partition of candles
|
|
for values from ('2026-04-01 00:00:00+00') to ('2026-05-01 00:00:00+00');
|
|
|
|
create table if not exists candles_2026_05
|
|
partition of candles
|
|
for values from ('2026-05-01 00:00:00+00') to ('2026-06-01 00:00:00+00');
|
|
|
|
create index if not exists idx_candles_instrument_tf_open_desc
|
|
on candles (instrument_id, timeframe, ts_open desc);
|
|
|
|
create index if not exists idx_candles_instrument_tf_close_desc
|
|
on candles (instrument_id, timeframe, ts_close desc);
|