Thomas,

Quads are stored in RDF_QUAD table, as follows:

create table DB.DBA.RDF_QUAD (
  G IRI_ID,
  S IRI_ID,
  P IRI_ID,
  O any,
  primary key (G,S,P,O)
  )
create bitmap index RDF_QUAD_OGPS on DB.DBA.RDF_QUAD (O, G, P, S)
;

(the very beginning of libsrc/Wi/sparql.sql if you build from sources.)

If you performs queries that does not specify fixed graph names, but
specify fixed predicates, the following indexes are quite useful:

create bitmap index RDF_QUAD_PSOG on DB.DBA.RDF_QUAD (P, S, O, G);
create bitmap index RDF_QUAD_POSG on DB.DBA.RDF_QUAD (P, O, S, G);

You can create other indexes as well. Bitmap indexes are preferable, but
if O is the last column then the index can not be bitmap, so it could
be, e.g.
create index RDF_QUAD_PSGO on DB.DBA.RDF_QUAD (P, S, G, O);
but not
create bitmap index RDF_QUAD_PSGO on DB.DBA.RDF_QUAD (P, S, G, O);

Best Regards,

Ivan Mikhailov,
OpenLink Software.


On Fri, 2008-02-22 at 15:46 +0100, Thomas Hornung wrote:
> Hi,
> 
> are there any special indices that can be turned on for querying RDF 
> data, e.g. subject/object -> predicate? AFAI understand the 
> documentation there is the possibility to use full text indices for 
> literals in the object position ( as mentioned in 
> http://docs.openlinksw.com/virtuoso/rdfsparqlrulefulltext.html), but I 
> couldn't find information on where to tweak other indices.
> 
> Does somebody know, if "special" indices are supported or are all 
> indices generated as a default setting.
> 
> Best regards,
> Thomas
> 


Reply via email to