I am trying to load data into Allegro Graph server and one of the parameters is --with-indices
. Can anybody explain what is it about?
I have read the entire Allegro Graph documentation and it mentions that indices can be spogi
, sopgi
, etc, but it does not mention as to what they are about.
Please explain precisely. (I am not asking for full-forms of spogi
, sopgi
, etc. What I want is their exact meaning.)
Your triple store contains triples
spo
(subject, predicate, object). A query against a graph so stored may have to traverse a lot of the graph to find nodes that match your query. AllegroGraph can store indices that make that traversal faster: finding all predicates that match first, for example, and the subject and object nodes that are attached, it can use an index that finds the predicates firstpso
. If your triples have named graphs you can addg
and, all your triples have idsi
. So AG can use an indexpsogi
. (From the docs: AllegroGraph Triple Indices)An AG triple store is created with a default set of indices. Generating specialized indices is resource intensive, but if you know what kinds of queries you're going to be getting, you may find it worthwhile to specify the appropriate indices to optimize response times.
If you're loading from the command line:
(from the docs for
agload
)if you're using the REST interface, you can create your repositories with specified indices:
with the parameter
index
:(from the docs for
put repo
)Or you can load your triples and then do:
(from the docs for
put index
)