vesoft-inc / nebula-python

Client API of Nebula Graph in Python
194 stars 76 forks source link

Parallel queries over single session #346

Closed doublex closed 3 months ago

doublex commented 4 months ago

Is it possible to run multiple queries in parallel via a single session (apart from 'union')? Example:

(GO FROM "user-123" OVER click YIELD click._dst AS post | LIMIT 10)
UNION 
(GO FROM "user-456" OVER click YIELD click._dst AS post | LIMIT 10)

(Sorry for the abuse of github-issue)

Best wishes! Marcus

wey-gu commented 3 months ago

It's indeed not feasible in an existing implementation(multiple queries are serially executed and only the last query result will be returned), but in theory, instead of leveraging single session, we could parallel them in multiple sessions and merge result from our own.

doublex commented 3 months ago

@wey-gu Thank you for your research and explanation.