Hi Ahmad, Deleting a Node (or a Relationship or a Property for that matter) does not actually remove the corresponding record - it marks it as unused. Also the store is *never* compacted. The id of the deleted nodes are stored in the corresponding .id file so that they can be reused later on (after a restart). This of course means that deleting a Node does not reduce space usage but actually increases it by writing on disk its id.
RelationshipTypes are not deleted, ever, neither explicitly or when you delete all Relationships that have that type. A way to remedy this is to copy over your database when you are done with your manipulations - do your additions/deletions in a "scratch" db and then create a new database instance and copy over your graph - this way no "holes" will be created and the store will be compacted, effectively defragmenting your database. The downside of this is that your ids will be not the same any more - if, for example, you deleted node with id 3 in the initial db, then you will have a node with that id in the defragged database. cheers, CG On Tue, Jul 26, 2011 at 12:53 PM, Ahmad Bakr <[email protected]> wrote: > Hi All, > > I have a question please and may you want to help me to figure it out, i > inserted about 240 nodes, 717 properties and 418 relationships with 5 > relationship types. the disk space usage was 77.3 MB (including all > components of Neo4j), the problem is i have to keep a specific disk space > for Neo4j thus i need to delete some nodes, the strange thing is when i > deleted the exisiting nodes and their relationships and properties, the disk > space usage is increased to 77.4 MB and this is weird, although the admin > interface of Neo4j shows that all nodes and relationship were deleted > however the relationship types still 5 :) > > Any help ? > > Thanks :) > > > -- > Ahmad Bakr > > Software Engineer > eSpace Technologies > www.espace.com.eg > > Mob: (+2) 010-410-2280 > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

