I'm trying to upsert two vertices in a single query. I'm doing the following query, but the second vertex somehow iterates the entire graph (see image clipped from executeprofile).
What am I misunderstanding here?
g
.V('1')
.fold()
.coalesce(
unfold(),
addV('Company').property('id', '1').property('pk','1')
)
.aggregate('a')
.V('2')
.fold()
.coalesce(
unfold(),
addV('Person').property('id', '2').property('pk', '2')
)
.as('b')