【发布时间】:2021-12-22 04:16:55
【问题描述】:
[用户在YugabyteDB Community Slack上发布的问题]
我有一个带有 TTL 和二级索引的表,使用 YugabyteDB 2.9.0,当我尝试插入一行时出现以下错误:
SyntaxException: Feature Not Supported
以下是我的架构:
CREATE TABLE lists.list_table (
item_value text,
list_id uuid,
created_at timestamp,
updated_at timestamp,
is_deleted boolean,
valid_from timestamp,
valid_till timestamp,
metadata jsonb,
PRIMARY KEY ((item_value, list_id))
) WITH default_time_to_live = 0
AND transactions = {'enabled': 'true'};
CREATE INDEX list_created_at_idx ON lists.list_table (list_id, created_at)
WITH transactions = {'enabled': 'true'};
我们有两种类型的查询(80% 和 20% 分布):
select * from list_table where list_id= <id> and item_value = <value>
select * from list_table where list_id= <id> and created_at>= <created_at>
我们预计每个list_id 将有大约 1000-10000 个条目。
TTL 大约是 1 个月。
【问题讨论】:
标签: yugabyte-db