타임스탬프가 순차 번호인 경우 가비지 컬렉션 정책 기준은 버전 수여야 합니다. 즉, 보관할 셀 수를 지정해야 합니다. 실제 타임스탬프 대신 순차 번호를 사용하는 경우 저장기간 기준 가비지 컬렉션 정책은 안전하지 않습니다. 그 이유는 저장기간 기준 정책이 타임스탬프를 기준으로 데이터를 삭제하기 때문입니다.
타임스탬프에 순차 번호를 저장할 때의 장점
필요한 경우 단조롭게 증가하는 타임스탬프를 사용할 수 있습니다.
타임스탬프에 순차 번호를 저장할 때의 단점
저장기간 기준 가비지 컬렉션으로 전환할 수 없습니다.
타임스탬프는 실제 날짜와 시간이 아니므로 값의 기간을 확인하는 등 다른 사용 사례에는 셀의 타임스탬프를 사용할 수 없습니다. 이 문제를 해결하려면 실제 타임스탬프를 별도의 열에 쓸 수 있지만 이렇게 하면 저장하는 데이터의 양이 늘어납니다.
[[["이해하기 쉬움","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(UTC)"],[[["\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)."]]