[Virtuoso-users] CREATE TABLE IF NOT EXISTS

2016-07-28 Thread Davis, Daniel (NIH/NLM) [C]
What is the best way to run some SQL statements to create tables if they do not 
exists?
I'm trying to achieve (at last), true automated deployment.

Dan Davis, Systems/Applications Architect (Contractor),
Office of Computer and Communications Systems,
National Library of Medicine, NIH

--
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Re: [Virtuoso-users] Virtuoso taking long time

2016-07-28 Thread Hugh Williams
Hi Maria,

The explain output is more for analysis by development, there are limited 
description of Query Plans at http://docs.openlinksw.com/virtuoso/perfdiag/ , 
but those params are not documented.  In terms of query execution the Virtuoso 
profile command can be used for determining if the query time is being spent in 
compilation rather then execution as detailed at, 
http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtTipsAndTricksAanalyzingSPARQLQuery
 . See also 
http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtQueryOptDiagnostic
 ...

Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc.  //  http://www.openlinksw.com/
Weblog   -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter  -- http://twitter.com/OpenLink
Google+  -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers

> On 28 Jul 2016, at 14:14, Maria Jackson  wrote:
> 
> Sorry for another mail. But just to confirm is the join used by the
> query plan below some kind of loop join:
> 
> {
> RDF_QUAD_POGS 4 rows(s_1_4_t1.S)
> P =  ##plays  ,  O =  #/Music
> RDF_QUAD_POGS   0.8 rows(s_1_4_t0.S)
> inlined  P =  ##type  ,  O =  ##Musician  ,  S = s_1_4_t1.S
> Distinct (s_1_4_t0.S)
> 
> After code:
>  0: X :=  := artm s_1_4_t0.S
>  4: BReturn 0
> Subquery Select(X)
> 
> After code:
>  0: X := Call __ro2sq (X)
>  5: BReturn 0
> Select (X)
> 
> On Thu, Jul 28, 2016 at 1:38 PM, Maria Jackson
>  wrote:
>> Dear All,
>> 
>> Thank you very much for your response. However, I am not able to
>> understand the meaning of "inlined", "rosq", "artm" in Virtuoso's
>> query plans. For exposition my question contains small example query.
>> 
>> Also how can I figure out which join algorithm is used by Virtuoso by
>> looking at the output of explain?
>> 
>> On Thu, Jul 28, 2016 at 11:50 AM, Maria Jackson
>>  wrote:
>>> I apologize for another mail, but I have a deadline tomorrow so I'll
>>> greatly appreciate if you could please help with this a little.
>>> 
>>> On Wed, Jul 27, 2016 at 9:45 PM, Maria Jackson
>>>  wrote:
 I ran the following query on Virtuoso:
 
 [code]PREFIX rdf:
 SELECT DISTINCT ?X
 WHERE
 {?X rdf:type Musician .
 ?X rdf:plays }
 [/code]
 
 The output of "explain" of this query is:
 [code]{
 RDF_QUAD_POGS 4 rows(s_1_4_t1.S)
 P =  ##plays  ,  O =  #/Music
 RDF_QUAD_POGS   0.8 rows(s_1_4_t0.S)
 inlined  P =  ##type  ,  O =  ##Musician  ,  S = s_1_4_t1.S
 Distinct (s_1_4_t0.S)
 
 After code:
  0: X :=  := artm s_1_4_t0.S
  4: BReturn 0
 Subquery Select(X)
 
 After code:
  0: X := Call __ro2sq (X)
  5: BReturn 0
 Select (X)
 }
 [/code]
 
 Now I am unable to decipher the output of explain command. What do
 "ro2sq", "inlined" and "artm" mean? And which join algorithm (like
 Hash Join, Merge Join, Nested loop join, etc.) is Virtuoso using for
 this query? I need to understand Virtuoso's explain command in order
 to understand the reason for Virtuoso taking a long time to execute?



smime.p7s
Description: S/MIME cryptographic signature
--
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Re: [Virtuoso-users] Virtuoso taking long time

2016-07-28 Thread Maria Jackson
Sorry for another mail. But just to confirm is the join used by the
query plan below some kind of loop join:

{
RDF_QUAD_POGS 4 rows(s_1_4_t1.S)
 P =  ##plays  ,  O =  #/Music
RDF_QUAD_POGS   0.8 rows(s_1_4_t0.S)
 inlined  P =  ##type  ,  O =  ##Musician  ,  S = s_1_4_t1.S
Distinct (s_1_4_t0.S)

After code:
  0: X :=  := artm s_1_4_t0.S
  4: BReturn 0
Subquery Select(X)

After code:
  0: X := Call __ro2sq (X)
  5: BReturn 0
Select (X)

On Thu, Jul 28, 2016 at 1:38 PM, Maria Jackson
 wrote:
> Dear All,
>
> Thank you very much for your response. However, I am not able to
> understand the meaning of "inlined", "rosq", "artm" in Virtuoso's
> query plans. For exposition my question contains small example query.
>
> Also how can I figure out which join algorithm is used by Virtuoso by
> looking at the output of explain?
>
> On Thu, Jul 28, 2016 at 11:50 AM, Maria Jackson
>  wrote:
>> I apologize for another mail, but I have a deadline tomorrow so I'll
>> greatly appreciate if you could please help with this a little.
>>
>> On Wed, Jul 27, 2016 at 9:45 PM, Maria Jackson
>>  wrote:
>>> I ran the following query on Virtuoso:
>>>
>>> [code]PREFIX rdf:
>>> SELECT DISTINCT ?X
>>> WHERE
>>> {?X rdf:type Musician .
>>> ?X rdf:plays }
>>> [/code]
>>>
>>> The output of "explain" of this query is:
>>> [code]{
>>> RDF_QUAD_POGS 4 rows(s_1_4_t1.S)
>>>  P =  ##plays  ,  O =  #/Music
>>> RDF_QUAD_POGS   0.8 rows(s_1_4_t0.S)
>>>  inlined  P =  ##type  ,  O =  ##Musician  ,  S = s_1_4_t1.S
>>> Distinct (s_1_4_t0.S)
>>>
>>> After code:
>>>   0: X :=  := artm s_1_4_t0.S
>>>   4: BReturn 0
>>> Subquery Select(X)
>>>
>>> After code:
>>>   0: X := Call __ro2sq (X)
>>>   5: BReturn 0
>>> Select (X)
>>> }
>>> [/code]
>>>
>>> Now I am unable to decipher the output of explain command. What do
>>> "ro2sq", "inlined" and "artm" mean? And which join algorithm (like
>>> Hash Join, Merge Join, Nested loop join, etc.) is Virtuoso using for
>>> this query? I need to understand Virtuoso's explain command in order
>>> to understand the reason for Virtuoso taking a long time to execute?

--
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Re: [Virtuoso-users] Cannot insert triplets into graph

2016-07-28 Thread Hugh Williams
Hi Pantelis,

OK, good to hear the issue has been resolved …

Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc.  //  http://www.openlinksw.com/
Weblog   -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter  -- http://twitter.com/OpenLink
Google+  -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers

> On 24 Jul 2016, at 12:37, Pantelis Natsiavas  wrote:
> 
> Hi Hugh.
> 
> Actually, what you say makes sense and fits in my case. As you probably 
> remember I was trying to run a transaction that needed days to execute. 
> Trying to speed things up and confirm if everything was OK, I restarted the 
> VM numerous times. Obviously, this could have caused some inconsistency in 
> the virtuoso database.
> 
> Despite this error, virtuoso seems to be running normally now. In the mean 
> time I have bulk loaded a big set of triples without error. Moreover, there 
> is no "/var/log/messages" file and no error.
> 
> The output of backup ‘/dev/null’; seems normal to me:
> 
> Done. -- 6890738 msec.
> 
> Thank you very much for your answer.
> 
> Kind regards,
> Pantelis Natsiavas
> 
> PS Please note that the link you sent me points to a rather general manual 
> and does not explain anything specific regarding integrity checking.
> 



smime.p7s
Description: S/MIME cryptographic signature
--
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Re: [Virtuoso-users] GeoSPARQL functions Support

2016-07-28 Thread Pasquale Di Donato
Hi Ghislain,
many thanks for your answer.
By the way the page you're mentioning doesn't resolv my doubts.

First the last two examples, which are using geospatial query
(bif:st_intersects) are not working: the first is giving no results, the
last an error.

Then I'm concerned with the geospatial functions. E.g. bif:st_intersect is
defined in an openlink ontology (http://www.openlinksw.com/schemas/bif#)
and are based as far as I can see on SQL MM.
The GeoSPARQL functions are defined here:
http://www.opengis.net/def/function/geosparql/. The GeoSPARQL function for
intersect is http://www.opengis.net/def/function/geosparql/sfIntersects

I don't understand if these GeoSPARQL functions are supported by Virtuoso.


Pasquale












On Thu, Jul 28, 2016 at 11:02 AM, Ghislain ATEMEZING <
ghislain.atemez...@gmail.com> wrote:

> Hi Pasquale,
> Yes, I think you are missing something. The point is probably that you are
> not using quite well the functions in your queries?!
> Please have a look at this page
> http://linkedgeodata.org/GADM which contains some sample queries for the
> LinkedGeo data endpoint which powered by Virtuoso.
>
> HTH
> Ghislain
>
> Sent from my iPhone, may include typos
>
> Le 28 juil. 2016 à 08:34, Pasquale Di Donato 
> a écrit :
>
> Dear list,
>
> yesterday I asked via a tweet @OpenLink is Virtuoso supports the GeoSPARQL
> functions here defined: http://www.opengis.net/def/function/geosparql/.
>
> Answer has been: "Virtuoso  supports much GeoSPARQL" today and I've been
> redirected to the following page:
> http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtGeoSPARQLEnhancementDocs
>
> In that page I see that geospatial queries are done via bif:something,
> where all these bif:* are built-in SQL MM based functions.
> Now if I do test with some GeoSPARQL functions, e.g. sfWithin, I get error
> messages: meaninf IMHO that GeoSPARQL functions are not supported.
>
> Or am I missing simething?
>
> Ciao
> Pasquale
>
>
> --
>
> ___
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>
>
--
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Re: [Virtuoso-users] GeoSPARQL functions Support

2016-07-28 Thread Ghislain ATEMEZING
Hi Pasquale,
Yes, I think you are missing something. The point is probably that you are not 
using quite well the functions in your queries?! 
Please have a look at this page 
http://linkedgeodata.org/GADM which contains some sample queries for the 
LinkedGeo data endpoint which powered by Virtuoso.

HTH
Ghislain 

Sent from my iPhone, may include typos

> Le 28 juil. 2016 à 08:34, Pasquale Di Donato  a 
> écrit :
> 
> Dear list,
> 
> yesterday I asked via a tweet @OpenLink is Virtuoso supports the GeoSPARQL 
> functions here defined: http://www.opengis.net/def/function/geosparql/.
> 
> Answer has been: "Virtuoso  supports much GeoSPARQL" today and I've been 
> redirected to the following page: 
> http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtGeoSPARQLEnhancementDocs
> 
> In that page I see that geospatial queries are done via bif:something, where 
> all these bif:* are built-in SQL MM based functions.
> Now if I do test with some GeoSPARQL functions, e.g. sfWithin, I get error 
> messages: meaninf IMHO that GeoSPARQL functions are not supported.
> 
> Or am I missing simething?
> 
> Ciao
> Pasquale
> --
> ___
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
--
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Re: [Virtuoso-users] Virtuoso taking long time

2016-07-28 Thread Maria Jackson
Dear All,

Thank you very much for your response. However, I am not able to
understand the meaning of "inlined", "rosq", "artm" in Virtuoso's
query plans. For exposition my question contains small example query.

Also how can I figure out which join algorithm is used by Virtuoso by
looking at the output of explain?

On Thu, Jul 28, 2016 at 11:50 AM, Maria Jackson
 wrote:
> I apologize for another mail, but I have a deadline tomorrow so I'll
> greatly appreciate if you could please help with this a little.
>
> On Wed, Jul 27, 2016 at 9:45 PM, Maria Jackson
>  wrote:
>> I ran the following query on Virtuoso:
>>
>> [code]PREFIX rdf:
>> SELECT DISTINCT ?X
>> WHERE
>> {?X rdf:type Musician .
>> ?X rdf:plays }
>> [/code]
>>
>> The output of "explain" of this query is:
>> [code]{
>> RDF_QUAD_POGS 4 rows(s_1_4_t1.S)
>>  P =  ##plays  ,  O =  #/Music
>> RDF_QUAD_POGS   0.8 rows(s_1_4_t0.S)
>>  inlined  P =  ##type  ,  O =  ##Musician  ,  S = s_1_4_t1.S
>> Distinct (s_1_4_t0.S)
>>
>> After code:
>>   0: X :=  := artm s_1_4_t0.S
>>   4: BReturn 0
>> Subquery Select(X)
>>
>> After code:
>>   0: X := Call __ro2sq (X)
>>   5: BReturn 0
>> Select (X)
>> }
>> [/code]
>>
>> Now I am unable to decipher the output of explain command. What do
>> "ro2sq", "inlined" and "artm" mean? And which join algorithm (like
>> Hash Join, Merge Join, Nested loop join, etc.) is Virtuoso using for
>> this query? I need to understand Virtuoso's explain command in order
>> to understand the reason for Virtuoso taking a long time to execute?

--
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


[Virtuoso-users] GeoSPARQL functions Support

2016-07-28 Thread Pasquale Di Donato
Dear list,

yesterday I asked via a tweet @OpenLink is Virtuoso supports the GeoSPARQL
functions here defined: http://www.opengis.net/def/function/geosparql/.

Answer has been: "Virtuoso  supports much GeoSPARQL" today and I've been
redirected to the following page:
http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtGeoSPARQLEnhancementDocs

In that page I see that geospatial queries are done via bif:something,
where all these bif:* are built-in SQL MM based functions.
Now if I do test with some GeoSPARQL functions, e.g. sfWithin, I get error
messages: meaninf IMHO that GeoSPARQL functions are not supported.

Or am I missing simething?

Ciao
Pasquale
--
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Re: [Virtuoso-users] Virtuoso taking long time

2016-07-28 Thread Lorenz B.
Hello Maria,

I'm not a Virtuoso developer, so I can't help you and the query is
rather simple. Probably depends on your settings and the size of the
dataset. It's also not clear what "long" means in your case.


Off-topic, but: please don't use predefined namespaces like RDF, RDFS or
OWL for your domain as you did with rdf:plays . That's for sure far away
from best-practice.



Kind regards,
Lorenz

> I ran the following query on Virtuoso:
>
> [code]PREFIX rdf:
> SELECT DISTINCT ?X
> WHERE
> {?X rdf:type Musician .
> ?X rdf:plays }
> [/code]
>
> The output of "explain" of this query is:
> [code]{
> RDF_QUAD_POGS 4 rows(s_1_4_t1.S)
>  P =  ##plays  ,  O =  #/Music
> RDF_QUAD_POGS   0.8 rows(s_1_4_t0.S)
>  inlined  P =  ##type  ,  O =  ##Musician  ,  S = s_1_4_t1.S
> Distinct (s_1_4_t0.S)
>
> After code:
>   0: X :=  := artm s_1_4_t0.S
>   4: BReturn 0
> Subquery Select(X)
>
> After code:
>   0: X := Call __ro2sq (X)
>   5: BReturn 0
> Select (X)
> }
> [/code]
>
> Now I am unable to decipher the output of explain command. What do
> "ro2sq", "inlined" and "artm" mean? And which join algorithm (like
> Hash Join, Merge Join, Nested loop join, etc.) is Virtuoso using for
> this query? I need to understand Virtuoso's explain command in order
> to understand the reason for Virtuoso taking a long time to execute?
>
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are 
> consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports.http://sdm.link/zohodev2dev
> ___
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>
-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

--
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Re: [Virtuoso-users] Virtuoso taking long time

2016-07-28 Thread Maria Jackson
I apologize for another mail, but I have a deadline tomorrow so I'll
greatly appreciate if you could please help with this a little.

On Wed, Jul 27, 2016 at 9:45 PM, Maria Jackson
 wrote:
> I ran the following query on Virtuoso:
>
> [code]PREFIX rdf:
> SELECT DISTINCT ?X
> WHERE
> {?X rdf:type Musician .
> ?X rdf:plays }
> [/code]
>
> The output of "explain" of this query is:
> [code]{
> RDF_QUAD_POGS 4 rows(s_1_4_t1.S)
>  P =  ##plays  ,  O =  #/Music
> RDF_QUAD_POGS   0.8 rows(s_1_4_t0.S)
>  inlined  P =  ##type  ,  O =  ##Musician  ,  S = s_1_4_t1.S
> Distinct (s_1_4_t0.S)
>
> After code:
>   0: X :=  := artm s_1_4_t0.S
>   4: BReturn 0
> Subquery Select(X)
>
> After code:
>   0: X := Call __ro2sq (X)
>   5: BReturn 0
> Select (X)
> }
> [/code]
>
> Now I am unable to decipher the output of explain command. What do
> "ro2sq", "inlined" and "artm" mean? And which join algorithm (like
> Hash Join, Merge Join, Nested loop join, etc.) is Virtuoso using for
> this query? I need to understand Virtuoso's explain command in order
> to understand the reason for Virtuoso taking a long time to execute?

--
___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users