CAST Imaging System - Information - Database - Neo4j - Configuration and Access

Purpose

This section deals with the database used by the CAST Imaging system - Neo4j.  It provides some assistance in  the configuration of  Neo4j database.

Imaging Version

ReleaseYes/No
2.x

Details

  1. Please see the following for Neo4j Access: CAST Imaging System - Information - How to access Neo4j
  2. Neo4j basic queries
    1. Specify database scope
      1. Use 
    2. List users and access (in Imaging database scope)
      1. MATCH (r:Role {Name: ‘Super Admin’})<-[:HAS_ROLE]-(k) RETURN k.Name, labels(k)

        MATCH (r:Role {Name: ‘Super Admin’})<-[:HAS_ROLE]-(k:User)<-[:CONTAINS_USER]-(sm:SecurityMode) RETURN k.Name, sm.Name

    3. List all databases
      1. SHOW DATABASES
  3. Neo4j advanced queries
    1. Top 5 tables with most reads
      1. MATCH (o:)-[r:USE]->(t:Object:) WHERE t.Type CONTAINS “Table”

        and (o:Object or o:SubObject)

        WITH DISTINCT r.aipLinkType as linkTypes, o, t

        UNWIND linkTypes as lt WITH lt,linkTypes, o, t

        MATCH(o1:) where lt = “select” and (o1:Object or o1:SubObject)

        RETURN DISTINCT lt as Link Type,COUNT(DISTINCT o) as No. of Reads, t.Type as Target Type, t.FullName as Target FullName, t.Name as Target Nameorder by No. of Reads desc limit 5

      2. Top 5 tables with most updates
        1. MATCH (o:)-[r:USE]->(t:Object:) WHERE t.Type CONTAINS “Table”

          and (o:Object or o:SubObject)

          WITH DISTINCT r.aipLinkType as linkTypes, o, t

          UNWIND linkTypes as lt WITH lt,linkTypes, o, t

          MATCH(o1:) where lt = “update” and (o1:Object or o1:SubObject)

          RETURN DISTINCT lt as Link Type,COUNT(DISTINCT o) as No. of Updates, t.Type as Target Type, t.FullName as Target FullName, t.Name as Target Nameorder by No. of Updates desc limit 5

        2. Please see the following for Neo4jNeo4j memory optimization:
          https://doc.castsoftware.com/display/IMAGING/Optimize+Neo4j+memory+allocation
        3. Please see the following for Neo4j Buffer size configuration:
          https://doc.castsoftware.com/display/IMAGING/Configuring+Neo4j+buffer+size
        4. Please see the following for Neo4j Disk usage optimization:
          https://doc.castsoftware.com/display/IMAGING/Optimize+Neo4j+disk+usage+-+cleanup+and+disable+JVM+crash+dumps
          https://doc.castsoftware.com/display/IMAGING/Optimize+Neo4j+disk+usage+-+transaction+log+retention
        5. Select the page you are interested in:
        6. If you do not find the information you are looking for or solution for your problem, please contact CAST Technical Support
        7. Notes/comments

          Related Pages