Skip to main content
Question

How to compute flex table keys on subset of very large table

  • December 22, 2023
  • 1 reply
  • 3 views

Sergey_Cherepan_1
Forum|alt.badge.img+2

Hi,
Flex table grew and grew... and grew... and grew more... and grew again... and so on.
Now, compute flex table keys are not going to finish in any reasonable time. And it does have new keys coming...
How I can compute flex table keys on recent date partitions only.
Thank you
Sergey

1 reply

Bryan_H
Forum|alt.badge.img+2
  • Participating Frequently
  • December 26, 2023

Hi, sorry for the delay - does the flex table define partitions? If so, a possible solution is to swap a partition to a temporary table with identical DDL (CREATE TABLE LIKE) and perform the compute keys / build view there, then extract data from the temp table. However, it seems like this would leave you with views for each temp table that you'll need to consolidate into a persistent table to cover all partitions. You might open a support case for this to see if engineering can find a better way to update flex tables by partition or range.