Please share some sample statements

The easiest way to do this is to use your perl script to separate your file 
into two (or more) distinct CSV files with consistent rows and then use LOAD 
CSV !!

see: http://neo4j.com/developer/working-with-data 
<http://neo4j.com/developer/working-with-data>

If you want to stay with your approach:
As already mentioned on twitter try this:
- use parameters
- use small statements (one per line)
- created indexes / constraints for nodes you look up via match
- combine multiple (up to 1000) operations in one transaction (in a single http 
requests or multiple)
- as of Neo4j 2.2 it's worth running this concurrently with many threads

For exporting the whole database into html (which will kill your browser)

the fastest is via cypher, make sure your client streams this away,
you can test it with curl first it will take a few seconds though to pull the 
data from disk (on a cold db) and stream it over the wire

match (n)-[r]->(m) 
RETURN { start: n,start_labels: labels(n), start_id:id(n),
                  end: m,end_labels: labels(m), end_id:id(m),
                  rel : r, type : type(r) }


> Am 21.03.2015 um 07:32 schrieb [email protected]:
> 
> Hello everybody,
> 
> My name is Santi. I'm a beginner with Neo4j.
> 
> I'm creating a Database to generate a Traceability Matrix of a SDLC.
> 
> I have 3 node types:
> Snapshot - Requirements - Test - Code
> 
> All Requirements, Tests and Codes are related to 1 snapshot.
> Requirements can be related to another requirements (Sub or Super 
> requirements)
> Test and Code can be related to requirements
> 
> All nodes have different properties and the relations are also holding 
> properties.
> 
> I'm running Neo4j in Debian.
> I have a csv with 13 million rows. My CSV is not consistent. Each column can 
> have different header depending if it is a Requirement/Code or Test.
> 
> This is my approach:
> I've been using Perl to parse the CSV, detect the different nodes and then 
> calling REST::Neo4p::Query->new to insert the node or create the relation.
> This is taking a long time. I would like to have suggestions on a better 
> approach to do this.
> 
> Would it be better to generate the Cypher code into a text file and then 
> execute it all together ? 
> I think that will improve the time since now every time I detect a node in 
> the csv I´m calling the REST API with a new query.
> 
> Also, after inserting the data in the database, I would need to pull 
> everything to generate the Traceability Matrix in HTML, what would be the 
> best way to do it ?
> I would need to extract all the database (traversing the whole graph) as fast 
> as possible to generate the HTML.
> 
> Let me know if you need more information, this is my first post here.
> 
> Thank you.
> Santi.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to