How can I adjust the frequency of RDF text indexing?


You may want to change the frequency of Virtuoso's RDF text index updates.

You can decrease the frequency, if your queries are usually made some time after data inserts/updates.

You can also increase the frequency to real-time, if you need inserts/updates to be immediately available for queries.


Virtuoso's RDF text indexes (that is, the indexes on literal object values, which are distinct from the indexes of URIs in any position) are updated periodically as a batch operation; by default, the interval is one (1) minute.

This means that typed literals (xsd:strings, XML, BLOBs/CLOBs, etc.) which are inserted or changed by SPARUL or other methods may not be immediately available to bif:contains, bif:xcontains, or other functions that depend on the text index.


  1. First, force a synchronization of the RDF text index:


  2. Next, set the text index to your desired frequency, using the VT_BATCH_UPDATE() function.
    • To update the index in real time, immediately after every change, use --


    • To decrease the frequency, use this form (changing the "1" below to your preferred interval, in minutes) --


  3. Insert some example data:

    SQL> SPARQL INSERT INTO <> { <> <> "Kalimero" . }; Query result: callret-0 ANY Insert into <>, 1 (or less) triples -- done No. of rows in result: 1

  4. Check the inserted triples:

    SQL> SELECT * FROM <> WHERE { <> ?p ?o }; Query result: p o ANY ANY Kalimero No. of rows in result: 1

  5. Check the inserted triples using bif:contains:

    SQL> SELECT * WHERE { <> ?p ?o . ?o bif:contains "Kalimero" }; Query result: p o ANY ANY Kalimero No. of rows in result: 1