[Neo4j] Way to know what is locked in the db and what query is locking it?

2017-01-19 Thread Matias Burak
Hi guys we are running in some situations where we see that a node is locked... we cannot write into it, it hangs when we do that from shell. Also we often see that something looks like locked but we don't know what. Is there any query or something we can do to see what's going on? Thanks, Mat

Re: [Neo4j] Way to create Neo4j indexes safely?

2017-01-12 Thread Matias Burak
Just an index. > El 12 ene. 2017, a las 11:08, Mattias Persson > escribió: > > OK cool, and are you creating constraint or just an index? > > On Thu, Jan 12, 2017 at 2:58 PM, Matias Burak <mailto:mbu...@gmail.com>> wrote: > Hi Mattias, it looks like it, this is

Re: [Neo4j] Way to create Neo4j indexes safely?

2017-01-12 Thread Matias Burak
> > CREATE INDEX shouldn't keep a schema lock during the duration of > population of the index. Is that what you're seeing here? > > Perhaps are you creating constraints? > > On Wednesday, January 11, 2017 at 9:07:42 PM UTC+1, Matias Burak wrote: >> >> Hi Mi

Re: [Neo4j] Way to create Neo4j indexes safely?

2017-01-11 Thread Matias Burak
> > On Tue, Jan 10, 2017 at 11:32 PM, Matias Burak > wrote: > >> Hi guys, >> >> Is there a way to create indexes safely while running an application? >> We need to create indexes on a remote Neo4j server dinamically while the >> system is running, so it

[Neo4j] Way to create Neo4j indexes safely?

2017-01-10 Thread Matias Burak
Hi guys, Is there a way to create indexes safely while running an application? We need to create indexes on a remote Neo4j server dinamically while the system is running, so it might be doing other calls to Neo4j server. Right now we create them by running a query like "CREATE INDEX ON :User(na

Re: [Neo4j] Re: Poor performance on relatively big db

2016-12-30 Thread Matias Burak
Ok, the USING INDEX had to go before WHERE, but doing that the query never finishes… Also, the first query you proposed is slower than the original. > El 30 dic. 2016, a las 11:32, Matias Burak escribió: > > I think most of the slowness is when doing count. If I just get a small set

Re: [Neo4j] Re: Poor performance on relatively big db

2016-12-30 Thread Matias Burak
, 8:06:45 (UTC-3), Michael Hunger > escribió: > I would turn boolean properties, like international into a label. > > > like this: > MATCH (n1:`Club`)<-[r1:CLUB]-(n:International) WHERE n1.name > <http://n1.name/>='FC Barcelona' RETURN COUNT(*) AS `Count` >

Re: [Neo4j] Re: Poor performance on relatively big db

2016-12-29 Thread Matias Burak
-+-+-+--+ >> >> Total database accesses: 7314391 >> >> That's the actual query and the execution plan. And yes, we do have >> indexes on :Club(name) and :Player(international) >> >> >> &

Re: [Neo4j] Re: Poor performance on relatively big db

2016-12-27 Thread Matias Burak
query execution plan of the query? > > On Sunday, December 25, 2016 at 1:17:30 PM UTC-6, Matias Burak wrote: >> >> Well, actually I was simplifying the query but what we really need to do >> is to filter by some property in club too (like club.name = 'FC >> Barcelona&

Re: [Neo4j] Re: Poor performance on relatively big db

2016-12-25 Thread Matias Burak
TCH (n:`Player`) WHERE n.`international` = true RETURN > SUM(size((n)-[:CLUB]->()) ) AS `Count`; > > On Saturday, December 24, 2016 at 3:55:26 AM UTC-6, Matias Burak wrote: > > We are working with the latest 3.1 version, we have a database of around > > 3.5M nodes and 100M relation

[Neo4j] Poor performance on relatively big db

2016-12-24 Thread Matias Burak
We are working with the latest 3.1 version, we have a database of around 3.5M nodes and 100M relationships. Doing some basic queries is very slow that makes the application unusable. neo4j-sh (?)$ profile MATCH (n1:`Club`)<-[r1:CLUB]-(n:`Player`) WHERE n.`international` = true RETURN COUNT(*) AS

[Neo4j] How can I share an object between threads without having to reload it?

2016-09-04 Thread Matias Burak
We have an application where we need to do some high-performance operations so we do them in batches in multiple threads. There are some objects that we would like to cache in a LoadingCache and use them in all the threads without having to get them again and again from the database. The proble

Re: [Neo4j] 'beginning implicit transaction' cannot be done... exception

2016-08-26 Thread Matias Burak
One(): private boolean tryFetchNext() { while ( recordBuffer.isEmpty() ) { if ( done ) { return false; } connection.receiveOne(); } return true; } Hope this helps, Matias. El viernes, 26 de agosto de 2016, 17:57:16 (UTC-3), Matias Burak e

Re: [Neo4j] 'beginning implicit transaction' cannot be done... exception

2016-08-26 Thread Matias Burak
t's very unhelpful to a > typical application developer. Coincidentally, we're currently working on > this part of the code so I'll make sure we improve the error message! > > Nigel > > On 3 August 2016 at 20:03, Matias Burak > > wrote: > >> Hi, a

[Neo4j] 'beginning implicit transaction' cannot be done... exception

2016-08-03 Thread Matias Burak
Hi, anyone knows why I am getting this error? 'beginning implicit transaction' cannot be done when a session is in the 'IN_TRANSACTION' state. This is using java-driver v1.0.4 and bolt 3.0.4 It looks that this is happening when the driver is doing a hasNext. Is that starting an implicit

[Neo4j] About relationship locks and deadlocks

2016-08-03 Thread Matias Burak
Hi all, we are getting into a deadlock scenario when we have multiple concurrent threads that are deleting/creating relationships. I'm not sure why we are getting them but as we are updating most of the relationships to the same nodes we are getting into something like this: We have (a1)-[:r1]-

Re: [Neo4j] Help with slow query

2016-08-03 Thread Matias Burak
> are visible not just the estimated ones? >> >> Please also share your current indexes/constraints (run "schema") >> >> Michael >> >> On Fri, Jul 22, 2016 at 1:09 AM, Matias Burak > > wrote: >> >>> Hi all, >>>

[Neo4j] Help with slow query

2016-07-24 Thread Matias Burak
Hi all, Hi, I need some help with a slow query, tried on neo4j 2.5 and 3.0 MATCH (n:DataModel:CI__DataModel) WHERE ( n.name='host' ) OPTIONAL MATCH(n)-[:PARENT]->(parentNode) OPTIONAL MATCH(n)-[:DISPLAYATTRIBUTE]->(displayAttributeNode) OPTIONAL MATCH(n)-[:CREATEDBY]->(createdByNode) OPT

Re: [Neo4j] Count(*) is very slow on a big database

2016-04-20 Thread matias . burak
Thanks Michael. Yeah, double negation because it's part of a more complex logic that has that result, but even removing that condition is slow. We'll try your proposal anyway. On Wednesday, April 20, 2016 at 3:57:47 AM UTC-3, Michael Hunger wrote: > > Double Negation ? > r1 is never null > Add a

[Neo4j] Count(*) is very slow on a big database

2016-04-19 Thread matias . burak
I'm using Neo4j 2.3.3. The query is very simple: neo4j-sh (?)$ MATCH (n:`label1`:`label2`), n-[r1:rel1]->n1 WHERE (n1.`name` IN ["name1","name2"] OR NOT(r1 IS NOT NULL)) RETURN COUNT(n) AS count; ++ | count | ++ | 462059 | ++ 1 row 2894 ms Any ideas on how to improve i

[Neo4j] Re: Unexpected result using queries with optional relationships

2016-02-01 Thread matias . burak
One more thing to add is that what I was doing for previous versions of Neo4j and it was working (but it's not allowed anymore) is the following: START n1=({node}) MATCH n1<-[r?:rel1]-n2 WHERE n1.propertyA = {param1} AND (r is null OR n2.propertyB! = {param2}) RETURN n1; Thanks, Mat

[Neo4j] Unexpected result using queries with optional relationships

2016-02-01 Thread matias . burak
Hi all, I'm having a hard time building a query with optional relationship using Neo4j 2.3.2. My query is something like this: MATCH (n1:Label1) WHERE (n1.propertyA = {param1}) OPTIONAL MATCH (n1)<-[r:rel1]-(n2:Label2) WHERE (NOT (n1)<-[r:rel1]-(n2) OR n2.propertyB = {param2}

Re: [Neo4j] fulltext_index and ORDER BY performance

2015-07-13 Thread matias . burak
Yeah, that's much better. I didn't know that I could put a fulltext field in the WHERE clause. Thank you so much. What about the ORDER BY case? Is there any tweak I can do? Matias. On Tuesday, July 7, 2015 at 4:46:02 PM UTC-3, Michael Hunger wrote: > > What you do is basically a hash join betwee

[Neo4j] fulltext_index and ORDER BY performance

2015-07-07 Thread matias . burak
Hi, i'm using version Neo4j 1.9 version and i'm running in to several performance issues in a db with 1M nodes. First problem is with fulltext indexing, for me this should be very fast but for example this query: START n=node(6494), x=node:fulltext_index("allConten