Folder reorganize 1

This commit is contained in:
Rucus
2026-02-17 12:44:37 -06:00
parent ec99d85bc2
commit f0ae0ab905
17427 changed files with 2071 additions and 1059030 deletions

View File

@@ -0,0 +1,12 @@
-- Composite indexes for your use case
CREATE INDEX idx_historicaldata_compound ON historicaldata (ID, TimeStamp DESC);
CREATE INDEX idx_historicaldata_timestamp ON historicaldata (TimeStamp DESC);
CREATE INDEX idx_id_names_lookup ON id_names (name, idnumber);
-- For date range queries
CREATE INDEX idx_historicaldata_daterange ON historicaldata (TimeStamp, ID)
WHERE TimeStamp >= '2020-01-01';
-- Partial indexes for recent data (if most queries are recent)
CREATE INDEX idx_recent_data ON historicaldata (ID, TimeStamp DESC)
WHERE TimeStamp >= NOW() - INTERVAL 30 DAY;