How to partition a database based on the feature names and store data in Dolphindb?

Viewed 17

The schema of my feature table looks like the following:

2022.01.04, SH.600000, V1, 0.123456
2022.01.05, SH.600000, V1, 0.234567
...
2022.01.04, SZ.000001, V1, 0.135790
2022.01.05, SZ.000001, V1, 0.987654
...
2022.01.04, SH.600000, V2, 0.123456
2022.01.05, SH.600000, V2, 0.234567
...
2022.01.04, SZ.000001, V2, 0.135790
2022.01.05, SZ.000001, V2, 0.987654

It includes feature names date, code, variable name, and value. This table will decrease or increase over time. The field for partitioning is the feature name. What schema shoud I adopt?

For the feature name (V1, V2...), the value may be increased to hundreds of thousands in the future. But for now, only thousands are currently in use. The query will be based on feature names.

1 Answers

It is recommended to adopt a combo partitioning scheme: one with the date in years, the other with the feature name you mentioned above. If the time granularity you are using is finer, the date range can also be divided by month and day. In DolphinDB, value partition can be dynamically extended, you can refer to the following user manual: add partition.

Related