Method and apparatus for updating clickhouse database
By using batch insert operations and version number control, the problem of low update efficiency of Clickhouse database under high concurrency was solved, achieving data consistency and real-time performance, and meeting the requirement of second-level page response.
CN117149784BActive Publication Date: 2026-05-29CHINA UNITECHS
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNITECHS
- Filing Date
- 2023-07-26
- Publication Date
- 2026-05-29
Smart Images

Figure CN117149784B_ABST
Abstract
The application discloses a method and device for updating a clickhouse database, and the method comprises the following steps: S01, based on the multi-distributed deployment of the clickhouse database in a big data environment, a local table and a distributed table of attack summaries are established in the clickhouse database, and a version field is added in the local table and the distributed table; S02, the clickhouse database program is modified. The application adopts the operation of the circulating update as the operation of the batch insertion, in the case that the new record and the old record exist simultaneously, the version number is introduced as the property of the latest record, the table building engine of the local table of the clickhouse database is changed, the version number field is used as the data merging relationship field, and the hash mode of the distributed table is changed, so that the information of the same attack summary is always in the same shard.
Need to check novelty before this filing date? Find Prior Art