5.7.6 SQL-Based Property Graph Analytics

In addition to the analytical functions offered by the graph server (PGX), the property graph feature in Oracle Spatial and Graph supports several native, SQL-based property graph analytics.

The benefits of SQL-based analytics are:

  • Easier analysis of larger graphs that do not fit in physical memory

  • Cheaper analysis since no graph data is transferred outside the database

  • Better analysis using the current state of a property graph database

  • Simpler analysis by eliminating the step of synchronizing an in-memory graph with the latest updates from the graph database

However, when a graph (or a subgraph) fits in memory, then running analytics provided by the graph server (PGX) usually provides better performance than using SQL-based analytics.

Because many of the analytics implementation require using intermediate data structures, most SQL- (and PL/SQL-) based analytics APIs have parameters for working tables (wt). A typical flow has the following steps:

  1. Prepare the working table or tables.

  2. Perform analytics (one or multiple calls).

  3. Perform cleanup

The following subtopics provide SQL-based examples of some popular types of property graph analytics.