Efficient methods to make a temporary copy of a table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2024 03:50 AM
I'm using a tool (SAS) that doesn't inherently support time travel - that's to say it doesn't generate SQL including Timestamp or Version (for example). An obvious work-around could be to first copy/clone the version of the table, which SAS can then work on (let's assume SAS only needs read access).
My question is: what's the most efficient approach to accomplish this ? For example you could build a view rather than copy the table. Alternatively, I don't suppose there is an alias-like feature where you can temporarily give a new name to a given version of the table ?
Thanks in advance, Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2024 12:42 AM
@phguk
I think that Shallow Clone would be the best solution here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2024 09:27 AM
Thanks for this suggestion. I've scanned the on-line docs but confess I still don't understand the difference between a view (unmaterialized) and a shallow clone. Docs say shallow clone should be cheaper. But why ? How about performance too ? I'd love to see a table comparing these approaches. Any insight you can share is appreciated. Of course an even better (theoretical) approach would be to allow an alias to be created for the table which simply hides the fact that it's a specific version of the table 😉 Tx Paul