This topic provides optimization tips on fact table partitioning, the retention period of tombstones, and the batch size for stream ingestion.

The optimization tips are as follows:

  • Partition a fact table by time and run the optimize command periodically. Run the optimize command on a completed partition, and avoid the partition to which data is being written. This is because the optimize command needs to be run on the partition after the data is written to the partition.
  • Run the vacuum command periodically and set a proper retention period of tombstones. The default retention period is 7 days.
  • Set a proper batch size for stream ingestion. A small batch size improves real-time performance but decreases the write throughput. Raising the batch size appropriately can help improve the write throughput when the upstream data overloads. For example, in scenarios where real-time performance is not prioritized, you can set the batch size to 1000 or 10000.