Read performance over <http://www.openlinksw.com/schemas/virtrdf#PrivateGraphs>

Hello,

I have a question about the read performance over the private group http://www.openlinksw.com/schemas/virtrdf#PrivateGraphs.

In my system if i query a graph_x, the query goes very fast, less than 1 second.

However when I insert the same graph in the group http://www.openlinksw.com/schemas/virtrdf#PrivateGraphs the performance decrease a lot, virtuoso requires 1min and 20 sec - 1min and 40 sec.

In the graph_x I have 506646 tuples

I work with openlink virtuoso Version: 07.20.3217

I’d like to know why does it happen.

Thank you!

I added a graph with about 250K triples to the http://www.openlinksw.com/schemas/virtrdf#PrivateGraphs graph group and could still query it in msecs both as the dba and none dba users the graph is allowed to be queried by.

What user are you running your query as ?

The latest Virtuoso Open Source Release is Version 07.20.3237-pthreads for Linux as of Sep 26 2023 (ec28543a2) I use , thus your indicated Version: 07.20.3217 is rather old and I would recommend upgrading to the latest version to get all the latest fixes etc.

I run the queries as dba dba.

I have 5066416 triples, and potentially I can have even more

If you are querying as the dba then graph security permissions do not apply that being the administrative use of the database, and so there should be not difference in performance querying the graph with in the http://www.openlinksw.com/schemas/virtrdf#PrivateGraphs graph group or not.

I tested with a 5M triple graph and do not experience any performance issue:

SQL> sparql select count(*) from <http://data.europa.eu/s66/ontology/Versions#> where {?s ?p ?o};
callret-0
INTEGER
_______________________________________________________________________________

5570310

1 Rows. -- 58 msec.
SQL> DB.DBA.RDF_GRAPH_GROUP_CREATE ('http://www.openlinksw.com/schemas/virtrdf#PrivateGraphs', 1);

Done. -- 2 msec.
SQL>  DB.DBA.RDF_GRAPH_GROUP_INS ('http://www.openlinksw.com/schemas/virtrdf#PrivateGraphs', 'http://data.europa.eu/s66/ontology/Versions#');

Done. -- 2 msec.
SQL> SELECT id_to_iri (RGGM_GROUP_IID), id_to_iri(RGGM_MEMBER_IID) FROM DB.DBA.RDF_GRAPH_GROUP_MEMBER WHERE RGGM_GROUP_IID = iri_to_id ('http://www.openlinksw.com/schemas/virtrdf#PrivateGraphs') ORDER BY 1,2;
id_to_iri                                                                         id_to_iri__1
LONG VARCHAR                                                                      LONG VARCHAR
_______________________________________________________________________________

http://www.openlinksw.com/schemas/virtrdf#PrivateGraphs                           http://data.europa.eu/s66/ontology/Versions#

1 Rows. -- 1 msec.
SQL> sparql select * from <http://data.europa.eu/s66/ontology/Versions#> where {?s ?p ?o} limit 10;
s                                                                                 p                                                                                 o
LONG VARCHAR                                                                      LONG VARCHAR                                                                      LONG VARCHAR
_______________________________________________________________________________

http://data.europa.eu/s66/ontology/Versions#5bdc1249-7939-4d0a-96b0-85d623f7485b  http://www.w3.org/1999/02/22-rdf-syntax-ns#type                                   http://data.europa.eu/s66/v#EntityIssue
http://data.europa.eu/s66/ontology/Versions#d7b98000-d67c-4c71-8889-dc3508a0b5d4  http://www.w3.org/1999/02/22-rdf-syntax-ns#type                                   http://data.europa.eu/s66/v#EntityIssue
http://data.europa.eu/s66/ontology/Versions#093ea5c2-4f58-42e7-82dc-47a0f5229cda  http://www.w3.org/1999/02/22-rdf-syntax-ns#type                                   http://data.europa.eu/s66/v#EntityIssue
http://data.europa.eu/s66/ontology/Versions#1293e2ee-f6f0-4680-b75f-88209f607b46  http://www.w3.org/1999/02/22-rdf-syntax-ns#type                                   http://data.europa.eu/s66/v#EntityIssue
http://data.europa.eu/s66/ontology/Versions#68c70199-d124-4258-a623-dba07d06b7b2  http://www.w3.org/1999/02/22-rdf-syntax-ns#type                                   http://data.europa.eu/s66/v#EntityIssue
http://data.europa.eu/s66/ontology/Versions#a3ff2cf0-11cb-4556-9463-943b10e51591  http://www.w3.org/1999/02/22-rdf-syntax-ns#type                                   http://data.europa.eu/s66/v#EntityIssue
http://data.europa.eu/s66/ontology/Versions#1eece570-fd8b-4ead-a37d-77783d191909  http://www.w3.org/1999/02/22-rdf-syntax-ns#type                                   http://data.europa.eu/s66/v#EntityIssue
http://data.europa.eu/s66/ontology/Versions#3a836a11-0e86-4f02-a21e-acb53894b7f7  http://www.w3.org/1999/02/22-rdf-syntax-ns#type                                   http://data.europa.eu/s66/v#EntityIssue
http://data.europa.eu/s66/ontology/Versions#4fff56d1-a1a4-43bf-bf9c-ae38469588aa  http://www.w3.org/1999/02/22-rdf-syntax-ns#type                                   http://data.europa.eu/s66/v#EntityIssue
http://data.europa.eu/s66/ontology/Versions#ca1d9928-e3e9-42b1-84c4-0eacb27e9eeb  http://www.w3.org/1999/02/22-rdf-syntax-ns#type                                   http://data.europa.eu/s66/v#EntityIssue

10 Rows. -- 2 msec.
SQL>

What is the query you are running ?

Have you upgraded to the latest Virtuoso Open Source Release is Version 07.20.3237 ?