-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clone table #2803
Comments
Maybe we could have a I imagine that cloning the actual (non-meta) data would be a separate step. |
I wa also thinking if this is to be done it should be something like a copy-on-write sort of things where the copy table has a new file that has blocks matching to the old file and when ever a block starts to get touched by the parerent able or the slave table the new entry (if being updatd by clone table) or the old entry (updated by parent table). This way crazy load is not added copying the table. The big use case for this is anaytlics and data transforming. |
Maybe we could implement the cloning by backfilling from an existing into a second new table. |
i mean that works but think about how long it could take to do that. if the table has a billion records where as if you do copy-on-write then only as items change do you need to do that operation. also saves disk space and if your running an anaytlics job that transforrms that data you dont want to wait for the backfill to finish so you can transform. |
@wojons: If the file system supports it we should certainly consider using that. Implementing our own copy-on-write, especially across two different files, would add a lot of additional complexity to our codebase. |
@danielmewes i know you can do it with one hand tied behind your back in less than an hour. well if we had triggers this could be possiable :) |
Its not COW, but I wrote a command line tool to help with cloning databases. It uses some techniques suggested by @danielmewes on a similar stack overflow question. |
@internalfx That's a very neat tool. Thanks for sharing! |
Issue Filed. #3 |
In the UI and CLI it would be useful to be able to clone an existing table. Table cloning should allow for a few different things.
The text was updated successfully, but these errors were encountered: