sparql alter quad storage virtrdf:SyncToQuads
 { create virtrdf:RDFH11 using storage virtrdf:DefaultQuadStorage };

create procedure DB.DBA.SYNC_ALL_TO_QUADS ()
{
  declare old_mode integer;
    old_mode := log_enable (null, 1);
      log_enable (2);
        sparql 
          define output:valmode "LONG" 
          define input:storage virtrdf:SyncToQuads 
          SELECT count (sql:rdf_vec_ins_triples (?s, ?p, ?o, ?g))
          WHERE { graph ?g { ?s ?p ?o } };
  log_enable (old_mode, 1);
}
;

DB.DBA.SYNC_ALL_TO_QUADS ();

