[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eThis page covers garbage collection in Bigtable when sequential numbers are used as timestamps instead of actual dates and times.\u003c/p\u003e\n"],["\u003cp\u003eWhen using sequential numbers, garbage collection policies should be based on the number of versions, rather than on data age.\u003c/p\u003e\n"],["\u003cp\u003eUsing sequential numbers allows for monotonically increasing timestamps, but prevents switching to age-based garbage collection.\u003c/p\u003e\n"],["\u003cp\u003eSequential number timestamps can't be used to determine a value's age, requiring a separate column for real timestamps, which increases storage needs.\u003c/p\u003e\n"],["\u003cp\u003eIt is important to use filters when reading the data even when using sequential number timestamps, because garbage collection is asynchronous.\u003c/p\u003e\n"]]],[],null,["Garbage collection for sequential numbers in timestamps\n\nYou may have a reason, not related to garbage collection, to assign sequential\nnumbers to the timestamp property for a cell, rather than assigning a date and\ntime. This page describes Bigtable garbage collection for data with this\ntype of artificial timestamps.\n\nBefore you read this page, you should read the overview of garbage collection,\nincluding the description of [real and artificial timestamps](/bigtable/docs/garbage-collection#timestamps).\n\nNumber of versions\n\nIf timestamps are sequence numbers, your garbage collection policy should be\nbased on the number of versions. This means that you specify the number of cells\nto retain. **An age-based garbage collection policy is unsafe** if you use\nsequential numbers instead of real timestamps, because age-based policies remove\ndata based on the timestamp.\n\nAdvantages of storing sequential numbers in timestamps\n\n- You are able to use monotonically increasing timestamps if you need to.\n\nDisadvantages of storing sequential numbers in timestamps\n\n- You cannot switch to age-based garbage collection.\n\n- Because your timestamps aren't an actual date and time, you cannot use the\n cells' timestamps for any other use case, such as determining how old a value\n is. As a workaround, you can write a real timestamp to a separate column, but\n this will increase the amount of data you store.\n\n- Because garbage collection is asynchronous, you still should always use\n filters when you read the data.\n\nWhat's next\n\n- Read an [overview of Bigtable garbage collection](/bigtable/docs/garbage-collection).\n- Explore strategies to [simulate cell-level TTL](/bigtable/docs/gc-cell-level).\n- Review code samples showing how to [configure garbage collection](/bigtable/docs/configuring-garbage-collection).\n- Learn more about [storage pricing](/bigtable/pricing#storage)."]]