This section deals with the database used by the CAST Imaging system - Neo4j. It provides some assistance in the configuration of Neo4j database.
Release | Yes/No |
---|---|
2.x |
- Please see the following for Neo4j Access: CAST Imaging System - Information - How to access Neo4j
- Neo4j basic queries
- Specify database scope
- Use <database name>
- List users and access (in Imaging database scope)
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
- List all databases
- SHOW DATABASES
- Specify database scope
- Neo4j advanced queries
Top 5 tables with most reads
MATCH (o:<object>)-[r:USE]->(t:Object:<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:<object>) 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 Name`order by `No. of Reads` desc limit 5
Top 5 tables with most updates
MATCH (o:<object>)-[r:USE]->(t:Object:<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:<object>) 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 Name`order by `No. of Updates` desc limit 5
- Please see the following for Neo4jNeo4j memory optimization:
https://doc.castsoftware.com/display/IMAGING/Optimize+Neo4j+memory+allocation - Please see the following for Neo4j Buffer size configuration:
https://doc.castsoftware.com/display/IMAGING/Configuring+Neo4j+buffer+size - 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 - Select the page you are interested in:
- If you do not find the information you are looking for or solution for your problem, please contact CAST Technical Support