Ultipa offers several strategies to optimize query performance.
Indexing. Indexes speed up property lookups by creating an index tree on disk, reducing the data scan required for retrieval and filtering. Ultipa also supports full-text indexing, which segments text and builds a reverse index, allowing for precise and fuzzy keyword matching. See Index and Full-text Index for details.
Caching. Caching stores frequently accessed data in memory, minimizing disk access and improving query response times. In Ultipa, caching can be applied to various data types, including graph topology and LTE-ed properties. See LTE and Cache for details.
Both indexes and caches in Ultipa are automatically updated to ensure that they reflect the most recent data. This helps maintain optimized query performance without requiring manual intervention for updates.
Index vs. LTE
A property can be indexed or LTE-ed to enhance performance. When selecting a strategy, consider their applicability and precedence in the following scenarios:
Scenario |
Index | LTE |
---|---|---|
Filtering of nodes and edges in find().nodes() and find().edges() queries |
✓ | ✕ |
Filtering of start nodes | ✓ (Precedence) | ✓ |
Filtering of nodes and edges in other places | ✓ | ✓ (Precedence) |
You can apply both indexing and LTE strategies to certain properties based on your needs. However, it's important to consider the efficient use of disk and memory space on shard servers to avoid excessive resource consumption.