You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Indexes of match statements have the following degradation related issues:
1. FullTagScan cannot be degraded if the index is not selected
(czp@nebula) [nba]> show tag indexes
+---------------------+----------+----------+
| Index Name | By Tag | Columns |
+---------------------+----------+----------+
| "player_name_index" | "player" | ["name"] |
+---------------------+----------+----------+
| "team_name_index" | "team" | ["name"] |
+---------------------+----------+----------+
Got 2 rows (time spent 2985/3978 us)
Query 1:
match (v:player)
return v
Query 2:
match (v:player)
where v.age>40
return v
Query 1(expected): FullTagScan
Query 2(unexpected): The execution result is an error. The expectation is to degenerate to FullTagScan when there is no index on player(age).
2. A low-priority index cannot be degraded if a high-priority index is not selected
(czp@nebula) [nba]> show tag indexes
+---------------------+----------+----------+
| Index Name | By Tag | Columns |
+---------------------+----------+----------+
| "player_name_index" | "player" | ["name"] |
+---------------------+----------+----------+
| "team_name_index" | "team" | ["name"] |
+---------------------+----------+----------+
Got 2 rows (time spent 3728/4894 us)
Query 3:
match (v:player)
where v.name=="Tim"
return v
Query 4:
match (v:player)
where v.name=="Tim" and v.age==40
return v
Query 3(expected): PrefixIndex(player.name)
Query 4(unexpected): The execution result is an error. The expectation is to degenerate to PrefixIndex(player.name) when there is no index on player(name,age).
3. The composite index was not selected as expected
(czp@nebula) [nba]> show tag indexes
+----------------------+----------+-----------------+
| Index Name | By Tag | Columns |
+----------------------+----------+-----------------+
| "player_age_index" | "player" | ["age"] |
+----------------------+----------+-----------------+
| "player_multi_index" | "player" | ["name", "age"] |
+----------------------+----------+-----------------+
| "player_name_index" | "player" | ["name"] |
+----------------------+----------+-----------------+
| "team_name_index" | "team" | ["name"] |
+----------------------+----------+-----------------+
Got 4 rows (time spent 3328/4334 us)
Query 5:
match (v:player)--(n:team)
where v.name=="Tim" and v.age>40
return v
Query 6:
match (v:player)--(n:team)
where v.name=="Tim" and v.age>40 and v.name=="Tim"
return v
Query 5(expected): CompositeIndex(name,age)
Query 6(unexpected): The execution result is an error. The expected index is CompositeIndex(name,age)
The text was updated successfully, but these errors were encountered:
Currently, Indexes of match statements have the following degradation related issues:
1.
FullTagScan
cannot be degraded if the index is not selectedQuery 1(expected): FullTagScan
Query 2(unexpected): The execution result is an error. The expectation is to degenerate to
FullTagScan
when there is no index on player(age).2. A low-priority index cannot be degraded if a high-priority index is not selected
Query 3(expected): PrefixIndex(player.name)
Query 4(unexpected): The execution result is an error. The expectation is to degenerate to
PrefixIndex(player.name)
when there is no index on player(name,age).3. The composite index was not selected as expected
Query 5(expected): CompositeIndex(name,age)
Query 6(unexpected): The execution result is an error. The expected index is CompositeIndex(name,age)
The text was updated successfully, but these errors were encountered: