在 Amazon Keyspaces 中查看表的容量模式 - Amazon Keyspaces(Apache Cassandra 兼容)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

在 Amazon Keyspaces 中查看表的容量模式

您可以在 Amazon Keyspaces 系统键空间中查询系统表,以查看有关表的容量模式信息。您还可以查看表使用的是按需吞吐容量模式还是预置吞吐容量模式。如果表配置为预置吞吐量模式,您会看到为表预置的吞吐容量。

示例

SELECT * from system_schema_mcs.tables where keyspace_name = 'mykeyspace' and table_name = 'mytable';

使用按需容量模式配置的表返回以下内容。

{ 'capacity_mode': { 'last_update_to_pay_per_request_timestamp': '1579551547603', 'throughput_mode': 'PAY_PER_REQUEST' } }

使用预置吞吐容量模式配置的表将返回以下内容。

{ 'capacity_mode': { 'last_update_to_pay_per_request_timestamp': '1579048006000', 'read_capacity_units': '5000', 'throughput_mode': 'PROVISIONED', 'write_capacity_units': '6000' } }

last_update_to_pay_per_request_timestamp 值以毫秒为单位。

要更改表的预置吞吐容量,请使用 ALTER TABLE