Re: [Neo4j] Re: Clearing nodes

2016-03-05 Thread Michael Hunger
Clean shutdown Ie "quit" or ctrl-d Von meinem iPhone gesendet > Am 06.03.2016 um 00:47 schrieb Jesse Hemingway : > > Ok, that certainly works. That's a bit boggling -- I have quite a few indexes > and constraints, if that could have any effect. I also use the TimeTree >

Re: [Neo4j] Understanding effect of LIMIT on planning

2016-03-05 Thread Michael Hunger
If the limit a parameter you could in those cases generate the string for the statement and replace the numeric value. Or you could use WHERE size(rels) < {limit} but I would go for creating the query string. the second query was not academic (my suggestions usually are not :) but a

Re: [Neo4j] Understanding effect of LIMIT on planning

2016-03-05 Thread Jesse Hemingway
And specifying those indices explicitly cut the db hits in half! I had read your Performance Tuning article and had put that little nugget on the back burner, not realizing how critical it could be! On Saturday, March 5, 2016 at 4:13:23 PM UTC-6, Jesse Hemingway wrote: > > Wow, there are a lot

Re: [Neo4j] Understanding effect of LIMIT on planning

2016-03-05 Thread Jesse Hemingway
Wow, there are a lot of ways to crack this nut. Thanks again for the thought-provoking options. For a moment, I thought I was getting the hang of Cypher, there is obviously I've only scratched the surface. In the meantime, I'm back to square 1 on the first query, as I realized my final

Re: [Neo4j] Re: Clearing nodes

2016-03-05 Thread Michael Hunger
Interesting, it works for me: on empty db, create 100k nodes 100k rels delete everything, check sizes restart create 100k nodes 100k rels delete everything, check sizes same size on disk wuqour:neo4j-enterprise-2.3.2 mh$ rm -rf test*.db wuqour:neo4j-enterprise-2.3.2 mh$ bin/neo4j-shell -path

Re: [Neo4j] Understanding effect of LIMIT on planning

2016-03-05 Thread Jesse Hemingway
Thank you Michael, This is great insight, and helps me better understand query structure. As I need the limit to be a parameter, I think it is not possible to use path length as the limiter. It also turns out not every post is categorized, so I found this variation on your suggestion to be

Re: [Neo4j] Re: Clearing nodes

2016-03-05 Thread Jesse Hemingway
This is not holding true for my setup, as I've seen my modest 10MB database grow to 250MB over the course of repeatedly testing my seeding logic, and shutting down the server many times as I made configuration changes for new modules, etc. Also, this SO article

[Neo4j] Understanding effect of LIMIT on planning

2016-03-05 Thread Jesse Hemingway
I'm pretty new to neo4j, and I'm working on optimizing my queries. For my example, let's say we have a lot of 'Post' nodes that can grow in an unbounded fashion. I'm using a linked-list to be able to scan back through recent posts without consulting every node. This works, but my question has

Re: [Neo4j] Understanding effect of LIMIT on planning

2016-03-05 Thread Michael Hunger
Hi Jesse, your first query has to aggregate over all the p's first to get the cagetories (you never know if the last p is the same as a previous one in the result set and has yet another category that you also have to collect for the post) yours query just takes the first 50 pairs of posts and

Re: [Neo4j] Re: Clearing nodes

2016-03-05 Thread Michael Hunger
Unused recoreds are reclaimed after restart, so if you restart after cleaning out then it will. But you can also just delete the db-directory. On Fri, Mar 4, 2016 at 10:52 PM, Jesse Hemingway wrote: > I actually just delete my database if I want to reset everything to a >