X

Oracle Spatial and Graph – technical tips, best practices, and news from the product team

  • March 2, 2018

Using SSD to Speed up Property Graph Operations in Oracle Database (III)

Alan Wu
Architect

This is the third installment of the series "Using SSD to Speed up Property Graph Operations in Oracle Database." For the first two, click 1st & 2nd. In this blog, I am going to show you how to serialize out an already-loaded in-memory graph into a .PGB format. A PGB format can be viewed as a memory dump of a graph snapshot. Hence it is very efficient to read back into memory. However, there is no easy way to make an update to an existing PGB.

...
opg-oracledb> pgxServer="http://127.0.0.1:7007/"
opg-oracledb> pgxSession=Pgx.getInstance(pgxServer).createSession("session1");
opg-oracledb> pgxGraph = pgxSession.readGraphWithProperties(opg.getConfig());
...

opg-oracledb> lStarttime=System.currentTimeMillis(); 
opg-oracledb> pgxGraph.store(Format.PGB, "/tmp/livej.pgb", true);
opg-oracledb> System.out.println("total ms " + (System.currentTimeMillis() - lStarttime));

total ms 13306

opg-oracledb> pgxGraph.memoryMb
==>1745

$ ls -l /tmp/livej.pgb
-rw-rw-r--. 1 user group 886096199 Mar  2 13:51 /tmp/livej.pgb
 

From the above results, we can see that it took about 13.3 seconds to write out a PGB of size 886 MB. In the next installment, I am going to talk about how to store this PGB persistently into Oracle Database.

Cheers,

Zhe Wu

 

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.