Hi Ivan,

Thanks for the response. I'll see if i can modify the query and get less
outer joins and see if it fixes the issue.

Thanks.
Sachit.

On Fri, Sep 30, 2011 at 11:05 PM, Ivan Mikhailov
<[email protected]>wrote:

> Hello Sachit,
>
> On Wed, 2011-09-28 at 12:12 +1000, Sachit Malhotra wrote:
> > Hi Guys,
> >
> >
> > I am trying to run a query by selecting 240 columns. Here's how the
> > query looks like:
> >
> >
> > prefix isbsg:
> > <
> http://localhost:8890/about/id/http/sachit-dev.clearbluewater.com.au:8890/DAV/home/dav/text.csv#
> >
> > SELECT
> > ?isbsgProject*>isbsg:isbsg_project_id as ?isbsg_project_id
> > ?isbsgProject*>isbsg:data_quality_rating as ?data_quality_rating
> > ?isbsgProject*>isbsg:ufp_rating as ?ufp_rating
> > ....
> > ...
> > ...
> > ....
> > where
> > { <http://example.com.au/wsf/datasets/1/example_user_23_27092011020901>
> <http://www.example.org/ontology/data/DatasetHasProject> ?exampleProject .
> }
>
> I.e., ~240 LEFT OUTER JOIN-s in the execution plan. That might be
> unrealistic even if ?isbsgProject is bound to a constant (that's not
> evident from the provided fragment of the query).
>
> > There are three issues that i have:
> >
> >
> >       * ISSUE 1: I cannot select all of the columns.
> >           I get a syntax error when i run the query with all columns
> > added. At about 128 column. Virtuoso 37000 Error SP030: SPARQL
> > compiler, line 128: syntax error
> >           Then when i remove all after 128, i get a second error.
> > Error SP031: SPARQL compiler: The nesting depth of subexpressions
> > exceed limits of SPARQL compiler. Then i remove more columns until i
> > get a result. So i got about 57 columns.
>
> *> is a shortcut for an OPTIONAL clause, and SPARQL spec says that
> OPTIONAL is binary operator. So
>
> ?isbsgProject*>isbsg:isbsg_project_id as ?isbsg_project_id
> ?isbsgProject*>isbsg:data_quality_rating as ?data_quality_rating
> ?isbsgProject*>isbsg:ufp_rating as ?ufp_rating
> ...
>
>  results in
>
> {{{{...
>
> { <http://example.com.au/wsf/datasets/1/example_user_23_27092011020901>
> <http://www.example.org/ontology/data/DatasetHasProject> ?exampleProject .
> }
>      OPTIONAL { ?isbsgProject
> isbsg:isbsg_project_id ?isbsg_project_id } }
>    OPTIONAL { ?isbsgProject isbsg:data_quality_rating ?data_quality } }
>   OPTIONAL { ?isbsgProject isbsg:ufp_rating ?ufp_rating } }
> ... }
>
> with nesting equal to number of distinct "*>" (plus a small constant)
>
>
> >       * ISSUE 2: (This has been raised earlier as well). When i add a
> >         from, again, the number of columns decreases from 57. So the
> >         more i add, the less column i can select.
>
> It's a separate issue, minor if compared with issues above.
>
> >       * ISSUE 3: Query execution time. Virtuoso 42000 Error The
> >         estimated execution time 1779716608 (sec) exceeds the limit of
> >         2147483647 (sec).I increased the execution time to test but
> >         the estimated time isn't even greater than the limit and still
> >         i get the above error.
>
> That may demonstrate the issue with error report, that is unable to
> properly print the number that exceeds MAXINT. Actually, the actual
> value of execution time forecast could be tens of orders of magnitude
> greater than MAXINT or the age of Universe.
>
> Best Regards,
>
> Ivan Mikhailov
> OpenLink Software
> http://virtuoso.openlinksw.com
>
>
>
>


-- 

Sachit Malhotra | Clear Blue Water Pty Ltd
+61 403565478 | [email protected]

<[email protected]>

Reply via email to