批量读取一个或多个表中的若干行数据。
BatchGetRow 操作可视为多个 GetRow 操作的集合,各个操作独立执行,独立返回结果,独立计算服务能力单元。
与执行大量的 GetRow 操作相比,使用 BatchGetRow 操作可以有效减少请求的响应时间,提高数据的读取速率。
请求结构
message BatchGetRowRequest {
repeated TableInBatchGetRowRequest tables = 1;
}
请求参数
参数 | 类型 | 是否必需 | 描述 |
---|---|---|---|
tables | repeated TableInBatchGetRowRequest | 是 |
指定了需要要读取的行信息。 若 tables 中出现了下述情况,则操作整体失败,返回错误。 |
响应消息结构
message BatchGetRowResponse {
repeated TableInBatchGetRowResponse tables = 1;
}
响应参数
参数 | 类型 | 描述 |
---|---|---|
tables | repeated TableInBatchGetRowResponse |
|
服务能力单元消耗
- 如果本次操作整体失败,不消耗任何服务能力单元。
- 如果请求超时,结果未定义,服务能力单元有可能被消耗,也可能未被消耗。
- 其他情况将每个 RowInBatchGetRowRequest 视为一个 GetRow 操作独立计算写服务能力单元,具体请参考 GetRow 服务能力单元消耗。