March 23, 2024 at 5:28 pm
unpartitioned transactions table 90 M ( source ) rows which cannot be down for a second has data from 2019-2024, we are on the latest azure MI business critical.
I was asked to create a partitioned table partition by month ( destination) for 2023-2027 data and move the data from source to this partitioned table. I created that with same schema, indexes etc, partitioned ok.
I have a script to do it in batches, was wondering if there is a SWITCH operation which can make /move things faster. Any ideas around that?
Thanks in Advance.
March 23, 2024 at 5:57 pm
not if you need to keep part of the data on the source table - a SWITCH means all table contents gets "moved" to a new table, or 1 partition on the original table gets moved to the corresponding partition on the second table.
depending on how active that table is and if you can easily identify the changed data (inserted/deleted/updated) then you may be able to prepare in advance for a move that would leave the original table with just a current required subset of data.
if you wish the new table to become your main new table that would require a few more steps but nothing major.
but regardless of method you will always have a few seconds/minutes where original table will not be available for any operation.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply