22.2 Visualizing PGQL Queries on Graphs Loaded Into the Graph Server (PGX)
You can create or load a graph into the graph server (PGX), and then run PGQL graph queries in the Graph Server tab of the Graph Visualization application.
The following sections describe in detail the various actions that you can perform in the Graph Server tab.
Creating a Property Graph in the Graph Server (PGX)
You can run the CREATE PROPERTY GRAPH
PGQL statement to create a
graph in the graph server (PGX). For example:
Figure 22-6 Creating a Property Graph in the Graph Server Memory
The graph gets created and loaded into the graph server memory (PGX). Note that this is a transient graph which will be destroyed at the end of the session.
You can click the Get Graphs List icon (shown highlighted in the preceding figure) to view all the graphs that are loaded into the graph server memory.
Loading or Unloading a Database Property Graph Into or From the Graph Server (PGX) Memory
You can also load or unload any existing PGQL or SQL property graph into or from the graph server (PGX) memory by performing the following steps:
- Click the
Load graph into memory icon in the GraphServer tab.
The list of database graphs to which you have access are displayed as shown:
Note that the SQL property graphs get listed only if you are connected to Oracle Database 23ai.
- Click the Load graph into memory icon against
the graph you wish to load into memory.
The confirmation dialog for loading the graph into memory opens.
Figure 22-8 Loading Graph Into Memory Confirmation
- Optionally, click to expand the Advanced
Options configuration.
The following advanced options can be configured:
- Ignore Invalid Edges Errors: Switch ON this toggle to ignore all edges that do not connect to a vertex.
- Synchronizable: Switch ON this toggle to verify that the graph can be synchronized.
- Optimized For: Select one of
the following graph optimization strategies:
READ
: To optimize for read-intensive scenarios.-
UPDATE
: To optimize for update-intensive scenarios.
- Parallelism: To specify the degree of parallelism.
- Click Load graph into memory.
The In Progress status against the graph indicates that the graph loading process is initiated and once the graph is successfully loaded into memory, the status gets updated to Memory.
- Click Close and click the Get Graphs List icon to verify that the graph is loaded into memory.
- Optionally, click to expand the Advanced
Options configuration.
- Optionally, click the Unload graph from
memory icon against the graph you wish to unload from memory.
The confirmation dialog for unloading the graph from memory opens as shown:
Figure 22-9 Unloading Graph from Memory Confirmation
Click Unload graph from memory. The Memory status gets updated to Database once the graph is unloaded from memory.
Running PGQL queries on the graph
You can enter a PGQL query on the desired graph and click Run Query to execute the query. On successful execution, the graph visualization result (including nodes and their connections) is displayed in the bottom panel. You can right-click a node or connection to display tooltip information, and you can drag the nodes around.
The following figure shows a sample query visualization identifying all edges that are directed edges from any vertex in the graph to any other vertex.
Parent topic: Using the Graph Visualization Application