6.8.1 Executing PGQL Queries Against Property Graph Schema Tables

This topic explains how you can execute PGQL queries directly against the graph stored in property graph schema tables.

The PGQL query execution flow is shown in the following figure.

Figure 6-1 PGQL on Property Graph Schema Tables in Oracle Database (RDBMS)

Description of Figure 6-1 follows
Description of "Figure 6-1 PGQL on Property Graph Schema Tables in Oracle Database (RDBMS)"

The basic execution flow is:

  1. The PGQL query is submitted to PGQL on RDBMS through a Java API.
  2. The PGQL query is translated to SQL.
  3. The translated SQL is submitted to Oracle Database by JDBC.
  4. The SQL result set is wrapped as a PGQL result set and returned to the caller.

The ability to execute PGQL queries directly against property graph data stored in Oracle Database provides several benefits.

  • PGQL provides a more natural way to express graph queries than SQL manually written to query schema tables, including VT$, VD$, GE$, and GT$.
  • PGQL queries can be executed without the need to load a snapshot of your graph data into PGX, so there is no need to worry about staleness of frequently updated graph data.
  • PGQL queries can be executed against graph data that is too large to fit in memory.
  • The robust and scalable Oracle SQL engine can be used to execute PGQL queries.
  • Mature tools for management, monitoring and tuning of Oracle Database can be used to tune and monitor PGQL queries.