6.8.2 Creating Property Graphs Using Graph Optimization Options

You can load a graph for querying and analytics or for performing update operations. Depending on your requirement, you can optimize the read or update performance using the OPTIONS clause in the CREATE PROPERTY GRAPH statement.

The following table describes the valid options that are supported in the OPTIONS clause:

Table 6-3 Graph Optimization Options

OPTIONS Description
OPTIMIZED_FOR_READ This can be used for read-intensive scenarios.
OPTIMIZED_FOR_UPDATES This is the default option and can be used for fast updates.
SYNCHRONIZABLE This assures that the graph can be synchronized via Flashback Technology. However, exceptions are thrown if one of the edge keys is either composite or non-numeric. In these cases, the graph can normally still be loaded, but PGX generates a new (numeric and non-composite) edge key. Such edges can therefore not be synchronized with the database.

For example, the following graph is set using OPTIMIZED_FOR_UPDATES and SYNCHRONIZABLE options:

CREATE PROPERTY GRAPH hr 
VERTEX TABLES ( 
EMPLOYEES LABEL Employee, DEPARTMENTS LABEL department 
) 
EDGE TABLES ( 
DEPARTMENTS AS managed_by 
SOURCE KEY ( DEPARTMENT_ID ) REFERENCES DEPARTMENTS 
DESTINATION EMPLOYEES 
NO PROPERTIES 
) OPTIONS (OPTIMIZED_FOR_UPDATES, SYNCHRONIZABLE)

Note:

SYNCHRONIZABLE option can be used in combination with OPTIMIZED_FOR_UPDATES and OPTIMIZED_FOR_READ. But, OPTIMIZED_FOR_UPDATES and OPTIMIZED_FOR_READ cannot be used together and in such a case an exception will be thrown.