10BC0 UPSERT using the wrong index, unable to provide an indexHint · Issue #14367 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

UPSERT using the wrong index, unable to provide an indexHint #14367

@lnogol

Description

@lnogol

My Environment

  • ArangoDB Version: 3.7.11
  • Storage Engine: RocksDB
  • Deployment Mode: Cluster
  • Deployment Strategy: Kubernetes
  • Configuration: networkAttachedVolumes: true on the ArangoDeployment, --server.statistics=true as extra arg
  • Infrastructure: own
  • Operating System: Ubuntu 20.04.2
  • Total RAM in your machine: 3 nodes, all 64GB
  • Disks in use: 3 nodes, all SSD 512GB
  • Used Package: Docker - official Docker library (arangodb/arangodb:3.7.11)

Component, Query & Data

Affected feature:
UPSERT index usage

Size of your Dataset on disk: 20GB

Replication Factor & Number of Shards (Cluster only):
all collections have replicationFactor: 3, writeConcern: 2 Number of shards: 1

Steps to reproduce

image

Problem:

I have 2 identical edge collections (same setting, same indexes). The same UPSERT query:

UPSERT {
  _from: 'a',
  _to: 'b'
}
    INSERT {}
    UPDATE {}
    IN collection
    RETURN {}

uses the correct (best) index for the first collection but uses the worse one for the second collection (see image above)

I thought maybe I could provide an indexHint but that doesn't appear to be possible in UPSERT and probably should be.

Expected result:

either

  • both pick the best index automatically, or
  • UPSERT allows to provide an indexHint

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0