Fetchplan in_*:-2 out_*:-2 not working
Hello, i am trying to exclude all edges from result, but its not possible via nodejs driver. I have this simple query: SELECT * FROM gift WHERE uuid = 'some-uuid' LIMIT 1 fetchplan in__:-2 out__:-2
If I use orientdb console, everything works. But use of query builder or db.query or db.raw with fetchplan will return everything.
I am using orientjs 2.1.11 and OrientDB 2.1.13 GA Community Edition
beginQuery event: { query: 'SELECT * FROM gift WHERE uuid = :paramuuid0 LIMIT 1', mode: 'a', fetchPlan: 'in__:-2 out__:-2', limit: -1, token: undefined, language: undefined, class: 'com.orientechnologies.orient.core.sql.query.OSQLAsynchQuery', params: { params: { paramuuid0: 'some-uuid' } } }
hi @janjilek,
Using node.js via binary protocol don't allow to remove fields from a record as studio(http api) does, this is a know issue, this it may be get fixed in 3.0, but more luckely for 3.1.
can we treat this as urgent case?
hmm, when you plan to release fixed version? Parsing of json is really slow, because of useless list of edges on every request... I am more and more annoyed of all the issues every day.
+1
hi,
This issue cannot be fixed in any version before 2.2 because the serialization engine for the binary protocol is the same of the one for the disc, this is not true since 2.2 and this was done for put the bases for fix this kind of issues
with orientdb 2.2 and orientjs 2.2 we have a new network serialization engine much faster, the fetch plan will not remove the fields yet, but i think the new version can mitigate a lot this issue.
the final release of 2.2 is few weeks away, feel free to try out the OrientDB 2.2 beta and the relative orientjs branch https://github.com/orientechnologies/orientjs/tree/2.2.x, any feedback will be appreciate.
Sure. Thanks for your info. I'm wonder how the fetchplan work out. Is it by default the orientdb will fetch and scan record and its related documents? As an example below that will go through all related documents for a record? select from #1:10
if it is the case and it will definitely bring down performance.
is there possible by default the orientdb not to touch or scan all related documents for retrieving a record?
Hi @tglman, @maggiolo00, Any updates on this or any workarounds? I was wondering how will this even work if selected records have thousands of edges connected. wouldn't it bring down the performance? (eventually, application would die going out of memory)
If it's not possible currently with binary protocol, is there a way to enforce OrientJS to use HTTP protocol?