> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chaintable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 进阶功能

> 设置区块表的起始高度，判断共识进度，并检查异步写入任务。

本页说明操作方法。起始高度和共识高度的含义见[工作原理](/zh/guides/tables/model#区块数据与处理进度)。

## 设置起始高度

在第一次写入前，打开区块表，点击 **Schema** 旁的设置图标，设置 **Start Height** 并保存。已有数据的表不能直接修改起始高度，应在建表时确定要覆盖的历史范围。

例如，若希望表从 `25939925` 开始覆盖，就在首次写入前把起始高度设为 `25939925`。小范围回填也可以保留默认值 `0`。

## 查看共识高度

下面读取一张区块表当前的共识高度：

```python theme={null}
from blockdb import StateTable

height = StateTable('demo.pool_reserves.eth').get_consensus_height()
print(height)
```

按[追踪流动性池储备变化](/zh/quickstart/build/track-pool-reserves)完成十个区块的回填后，已处理区间是 `25939925` 至 `25939934`，而表的起始高度仍是默认的 `0`，因此这里打印出来的是 `0`。

## 查看异步写任务

`batch_write()` 返回 `True` 只表示任务提交成功。每张支持批量写入的表有对应的任务表，ID 为 `<table_id>._write`。在目标表的 **Relations** 中点击 **write**，即可打开任务列表。

<Frame>
  <img src="https://mintcdn.com/opcodelabspteltd/TOA0bb8_WqdBuVVN/images/guides/tables/write-jobs.png?fit=max&auto=format&n=TOA0bb8_WqdBuVVN&q=85&s=e558831a2f4389320ba206d4e455f1ba" alt="asset_notes 的异步写任务列表，状态为 succeed" width="1920" height="1080" data-path="images/guides/tables/write-jobs.png" />
</Frame>

下面读取普通表的写任务记录：

```python theme={null}
from blockdb import NormalTable

jobs = NormalTable('demo.asset_notes._write').filter_rows(limit=10)
for job in jobs:
    print(job['id'], job['status'], job.get('error_message'))
```

| 字段                            | 用途                  |
| ----------------------------- | ------------------- |
| `id`                          | 写任务 ID              |
| `status`                      | 任务状态；成功值为 `succeed` |
| `row_count`                   | 本次输入行数              |
| `input_bytes`                 | 本次输入数据的字节数          |
| `submitted_at` / `updated_at` | 提交和最后更新时间           |
| `error_message`               | 任务提供的错误信息，可能为空      |
| `client_id`                   | 提交任务的客户端或运行实例标识     |
| `strategy`                    | 本次写入的方式和目标表         |
