I declre this partition on table:
ALTER TABLE public.T2
PARTITION BY date(ts at time zone 'UTC')::date
GROUP BY (
CASE WHEN DATEDIFF('MONTH', date(ts at time zone 'UTC')::date, NOW()::TIMESTAMPTZ(6)) >= 12
THEN DATE_TRUNC('MONTH', date(ts at time zone 'UTC')::date)
ELSE date(ts at time zone 'UTC')::date END);
During the day Vertica inserts to the table, data with time ts.
At the end of each business day I will call ANALYZE_STATISTICS_PARTITION and collect statistics on all data
what is the best query to run:SELECT ANALYZE_STATISTICS_PARTITION('public.T2', CURRENT_DATE::VARCHAR(10), CURRENT_DATE::VARCHAR(10));
or SELECT ANALYZE_STATISTICS_PARTITION('public.T2', minvalue, maxvalue);
when max and min are :
select projection_name, min(partition_key), max(partition_key) from partitions group by projection_name