JanusGraph / JanusGraph/janusgraph

Add multi-query optimization to index

Open
#3,901 0 comments 0 reactions 0 assignees View on GitHub
area/core kind/performance
Dominant language
Java
Stars
5.8k
Forks
1.2k
Avg merge
13h 53m
Merged PRs (30d)
6

Description

Currently JanusGraph supports multi-keys and multi-slice queries. However, not for index queries.
For example, let's assume we have a composite index on vertices for property `id`.
The below query will execute 5 sequential queries instead of doing either 5 parallel queries or a single combined query:
```
g.V().has("id", P.in(1,2,3,4,5))
```
I believe we can reuse similar technique we use for slice queries and apply this optimization for index queries as well.
As such, storage implementation will have a choice on how they want to execute such queries (i.e. in parallel, sequentially, or grouped query).

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing multi-key and multi-slice query handling, then trace how index queries execute values from P.in(1,2,3,4,5). Done means index queries can use a combined optimization while leaving storage implementations free to choose sequential, parallel, or grouped execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.