Hi Laurent,
you can get the Node and Relationship count by asking the NodeManager
for the number of IDs in use. Look at
http://github.com/tinkerpop/gremlin/blob/master/trunk/src/main/java/com/tinkerpop/gremlin/db/neo/NeoGraph.java#L108
for an example. This is not in the public API, but will end up there
when the Config API is exposed.

This should speed up things a bit :)

Cheers,

/peter neubauer

COO and Sales, Neo Technology

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org                - Relationships count.
http://gremlin.tinkerpop.com    - PageRank in 2 lines of code.
http://www.linkedprocess.org   - Computing at LinkedData scale.



On Mon, Dec 28, 2009 at 3:33 PM, Laurent Laborde <kerdez...@gmail.com> wrote:
> On Mon, Dec 28, 2009 at 3:26 PM, Laurent Laborde <kerdez...@gmail.com> wrote:
>> Hi !
>>
>> i want to know how many relationship and node i have in my database.
>> My bruteforce way is *insanly* slow (at this speed... it will take
>> (many?) hours...)
>
> Ho well... it started slowly. But it finally took just a few mn.
>
> Number of nodes : 260626
> Number of relations : 8049649
>
> --
> Laurent "ker2x" Laborde
> Sysadmin & DBA at http://www.over-blog.com/
> _______________________________________________
> Neo mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to