cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Retrieving the records using .NET driver (Neo4jClient ) is taking too long

Hi,

I am new to Neo4j and trying to explore for one of my project. Here is how i have setup the nodes and their relationships.

  1. An organization can have sub organizations under it.
  2. An organization can have users under organization or sub organization.
  3. A user have access to loans
  4. User in top organization can have access to user loans who are under sub organization.
  5. Here are the relationships

Here is the query i am using to get all the loans that are present under Org1 as well as all the loans under sub organizations under Org1.

match path = (o:Org {id:"Org1"}) - [:HAS_USER | ACCESS | HAS_CHILD*] - > (k:Loan) return k.loanGuid

when we try to run the above query from .NET code using Neo4jClient, it is taking around 12 to 20 seconds to return 150k records, which is too long. Is this expected ?
Here is the c# code

var client = new GraphClient(new Uri("http://localhost:7474/db/data"), "neo4j", "Test123456!")
{
JsonContractResolver = new CamelCasePropertyNamesContractResolver()
};

        client.Connect();

var results1 = client.Cypher
.Match("(o:Org {id:'Org1'})-[:HAS_USER | ACCESS | HAS_CHILD*]->(l:Loan)")
.Return((l) => new
{
Loan = l.As()
}).Results;

Can you please respond is this expected or something wrong the way that i am retrieving using .NET driver ?

I am using community edition : 3.5.14 and installed as single node on my local machine.

3 REPLIES 3

accounts
Node Clone

i just tried this kinda thing with both the Neo4j.Driver and Neo4jClient. my DB is on azure and my very similar query to yours

match (i:MyItem)-[:BELONGS_TO]-(i2:OtherItem) return i2.bar

returned 800k records in 6 seconds using the driver and 8 seconds using Neo4jClient

i'd look at :explain and profile for hits ( also how long does it take to get the result on the browser )

Thanks for helping me regarding this. Here is the screen shot of the result in the browser.

what exactly the meaning of "Started streaming 153693 records after 10 ms and completed after 2203 ms, displaying first 1000 row" ?

Does it mean the browser got all 150K records from database in 2203 ms and displayed on 1000 rows?

Here is the profile

Total i have 350K + nodes, out which 99 percent are loan nodes ( which are in leaf ), each has a unique number. I can not have index for these nodes.

Please take a look at the above data and provide your inputs. Thanks

@accounts

Could you please help regarding this ? Thanks

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online