Skip to content
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

How to set table TTL and TTL_GRANULARITY using ALTER TABLE? #31869

Closed
noobgramming opened this issue Jan 21, 2022 · 2 comments
Closed

How to set table TTL and TTL_GRANULARITY using ALTER TABLE? #31869

noobgramming opened this issue Jan 21, 2022 · 2 comments
Labels
type/question The issue belongs to a question.

Comments

@noobgramming
Copy link

General Question

Hi, I'm trying to set a row TTL for existing table.

This reference gives example for setting TTL on new table https://en.pingcap.com/blog/managing-you-data-lifecycle-with-time-to-live-tables/

and says You can also use ALTER TABLE to switch an existing table to a row-granularity TTL table. but does not describe how to do it.

I have tried setting like let you configure ENGINE with alter table tbl TTL='30h' and that doesn't work.

syntax reference also says nothing about it https://docs.pingcap.com/tidb/stable/sql-statement-alter-table

Can you kindly link me to documentation on this or just reply how to do it?

@noobgramming noobgramming added the type/question The issue belongs to a question. label Jan 21, 2022
@noobgramming
Copy link
Author

I can see from #22763 that I'm using proposed syntax correctly... So maybe this just isn't implemented yet

@sunxiaoguang I see you worked on that RFC and the blog post, maybe you can give me a hand on this?

@SunRunAway
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/question The issue belongs to a question.
Projects
None yet
Development

No branches or pull requests

2 participants