Getting the CL spaces

Original Query


select x, @p, y from {x;cl:CLSpace}@p{y} using namespace cl = &http://www.kp-lab.org/ontologies/CL#
Average time of original query was 36 sec

Proposals

  • list properties

select x, @p, y from {x;cl:CLSpace}@p{y} where @p = tlo:dc_title or @p = tlo:dc_description or @p = tlo:dc_creator or @p = tlo:dc_created or @p = tlo:dc_modified using namespace cl = &http://www.kp-lab.org/ontologies/CL#, tlo = &http://www.kp-lab.org/system-model/TLO#
Time 1797 ms (at the time of run)
Patrick comment: when the swkm "execute" the WHERE clause, it tests all the possible combinations of "OR". It means that the time of the query will grow in a exponential way based on the amount of "or" clauses.
  • inner select

select x, (select t from {x}dc_title{t}), (select d from {x}dc_description{d}), (select c from {x}dc_creator{c}), (select r from {x}dc_created{r}), (select m from {x}dc_modified{m}) from cl:CLSpace{x} using namespace cl = &http://www.kp-lab.org/ontologies/CL#
Time 651 ms (at the time of run) UPDATE 865ms (4.10.2010)
    • How to parse the result into MM?
      • Use tagged querry

select (select "title", x, t from {x}dc_title{t}), (select "desc", x, d from {x}dc_description{d}), (select "creator", x, c from {x}dc_creator{c}), (select "created", x, r from {x}dc_created{r}), (select "modified", x, m from {x}dc_modified{m}) from cl:CLSpace{x} using namespace cl = &http://www.kp-lab.org/ontologies/CL#
Time 1230 ms (at the time of run) UPDATE 1178ms (4.10.2010)
      • Use tagged query VERSION 2

select x, dc_title, (select t from {x}dc_title{t}), dc_description, (select d from {x}dc_description{d}), dc_creator, (select c from {x}dc_creator{c}), dc_created, (select r from {x}dc_created{r}), dc_modified, (select m from {x}dc_modified{m}) from cl:CLSpace{x} using namespace cl = &http://www.kp-lab.org/ontologies/CL#
Time 907ms (4.10.2010)
  • multiple query

select x, @p, y from {x;cl:CLSpace}@p{y} where @p = tlo:dc_title using namespace cl = &http://www.kp-lab.org/ontologies/CL#, tlo = &http://www.kp-lab.org/system-model/TLO#",

select x, @p, y from {x;cl:CLSpace}@p{y} where @p = tlo:dc_description using namespace cl = &http://www.kp-lab.org/ontologies/CL#, tlo = &http://www.kp-lab.org/system-model/TLO#",

select x, @p, y from {x;cl:CLSpace}@p{y} where @p = tlo:dc_created using namespace cl = &http://www.kp-lab.org/ontologies/CL#, tlo = &http://www.kp-lab.org/system-model/TLO#",

select x, @p, y from {x;cl:CLSpace}@p{y} where @p = tlo:dc_modified using namespace cl = &http://www.kp-lab.org/ontologies/CL#, tlo = &http://www.kp-lab.org/system-model/TLO#"
Time 2500 ms (at the time of run)
  • selecting specific resources

select x, t, d, c, r, (select m from {x}dc_modified{m}) from {x;cl:CLSpace}dc_title{t}, {x}dc_description{d}, {x}dc_creator{c}, {x}dc_created{r} using namespace cl = &http://www.kp-lab.org/ontologies/CL#, tlo = &http://www.kp-lab.org/system-model/TLO#
Time 1122 ms (at the time of run)
    • How to parse the result into MM?
    • This approach is very dangerous because if for an object one property is "missing" (e.g. one CLSpace has no "dc_description") then this object (with its "existing" properties) is not returned at all in the result.

Getting Virtual Whiteboard

Getting resources for Virtual Whiteboard (VW) consist of 3 RQLs. First RQL collects data that are non GUI specific other two RQLs collects data which are GUI specific.

Original Query


SELECT X,@P,Y FROM {X}@P{Y}, {X}tlo:belongsToSharedSpace{S} WHERE S=&http://www.kp-lab.org/ontologies/CL#CLSpace:_080407-1051-bed0e2df-c62f-437b-9b50-066c8ca65401 USING NAMESPACE tlo=&http://www.kp-lab.org/system-model/TLO#
Time 4472 ms (at the time of run)

SELECT X,@P,Y FROM {X;cl:CLWindowRepresentation}@P{Y}, {X}cl:representsCLTheme{Z}, {Z}cl:belongsToCLSession{S} WHERE S=&http://www.kp-lab.org/ontologies/CL#CLCollectiveSession:_080407-1056-6bf2ba4b-ea6c-4e79-a20b-94ca34ef3953 USING NAMESPACE cl=&http://www.kp-lab.org/ontologies/CL#
Time 22881 ms (at the time of run)

SELECT X,@P,Y FROM {X;cl:CLObjectRepresentation}@P{Y}, {X}cl:pointsToAssignment{A}, {A}tlo:belongsToSharedSpace{S} WHERE S=&http://www.kp-lab.org/ontologies/CL#CLSpace:_080407-1051-bed0e2df-c62f-437b-9b50-066c8ca65401 USING NAMESPACE tlo=&http://www.kp-lab.org/system-model/TLO#, cl=&http://www.kp-lab.org/ontologies/CL#
Time 21842 ms (at the time of run)
  • queries are executed using executeMultipleQueries() in TUKE SWKM client

Proposals

  • constrain classes and properties
  • the '^' operator can not be used because TUK MM needs to be fully instantiated for proper parsing afterwards
  • try to load all the window representations and object representation for every CLSpace and parse them afterwards to collect relevant ones
  • alter ontology to ease the SWKM search for properties

Getting Item Archive

Original Query


SELECT X,@P,Y FROM {X}@P{Y}, {X}tlo:belongsToSharedSpace{S} WHERE S=&http://www.kp-lab.org/ontologies/CL#CLSpace:_080407-1051-bed0e2df-c62f-437b-9b50-066c8ca65401 USING NAMESPACE tlo=&http://www.kp-lab.org/system-model/TLO#
Time 3520 ms (at the time of run)

Proposals

  • See proposals on VW

Getting CL Sessions

Original Query


SELECT X,@P,Y FROM {X;cl:CLSession}@P{Y}, {X}tlo:belongsToSharedSpace{S} WHERE S=&http://www.kp-lab.org/ontologies/CL#CLSpace:_080331-1729-63ca2232-ddc0-4a18-b2e7-876cf5dd86a9 USING NAMESPACE cl=&http://www.kp-lab.org/ontologies/CL#, tlo=&http://www.kp-lab.org/system-model/TLO#
Time 2409 ms (at the time of run)

Proposals

  • See proposals on VW
  • try to use listing of properties

Notes

  • All RQL queries was tested on the http://139.91.183.100:3027/SwkmMiddlewareWS20/ endpoint
  • Performance of queries also depends on number of properties we want to get, so for many properties, some other type may be the best one
  • How these queries perform in environment with multiple clients?
  Page Info My Prefs Log in
This page (revision-6) last changed on 18:24 25-Mar-2017 by Patrick Ausderau.
 
JSPWiki v2.4.102
[RSS]