Data modeling performance considerations
This article outlines key data modeling factors that impact performance when ingesting and querying data.
To manage containers and govern schema components, you can use NEAT (open source) and the CDF Toolkit.
Indexes and constraints
To improve the speed of data retrieval and sorting, you can index any property defined in a container. However, indexes also come with a performance cost during certain operations.
You can configure a maximum of 10 indexes for each container. Each index can include an individual property, or combinations of properties (composite indexes). The order of the properties is important for composite indexes.
The properties most frequently included in queries are primary candidates to include in an index. Also, you should consider the size of the data set, and the update frequency of the data.
You can specify two main index types for the data modeling service: Btree and inverted indexes.
The examples in this section assume the following container definitions:
# Example container definitions
space: site_assets
container:
# A container for the "Asset" type with a single property "asset_id"
- externalId: Asset
name: Asset
usedFor: node
description: The Asset container
properties:
asset_id:
name: asset_id
type:
type: int64
site:
name: site
type:
type: text
name:
name: name
type:
type: text
# [... more asset specific container properties could be included here]
# A container for the "Description" type
- externalId: Description
usedFor: node
properties:
title:
type:
type: text
list: false
collation: ucs_basic
nullable: true
description_text:
type:
type: text
list: false
collation: ucs_basic
nullable: true
labels:
type:
type: text
list: true
collation: ucs_basic
nullable: true