Ticket #1140 (assigned defect)

Opened 17 months ago

Last modified 10 months ago

Mulgara query returns UnhandledException Error

Reported by: rcave Owned by: rcave
Priority: medium Milestone:
Component: ambra Version: 0.9.1_rc1
Keywords: Cc:

Description

The query that is hanging Mulgara:

select $cat $a $date from <local:///topazproject#filter:graph=ri>
where $a <rdf:type> <http://rdf.topazproject.org/RDF/Article> in <local:///topazproject#filter:graph=ri>
and $a <http://rdf.topazproject.org/RDF/hasCategory> $oqltmp2_0 in <local:///topazproject#filter:graph=ri>
and $oqltmp2_0 <http://rdf.topazproject.org/RDF/mainCategory> $cat in <local:///topazproject#filter:graph=ri>
and (
$oqltmp3_0_1_o0_f0_0_0_ <http://purl.org/dc/terms/hasPart> $a in <local:///topazproject#filter:graph=ri>
and $oqltmp3_0_1_o0_f0_0_0_ <mulgara:is> <info:doi/10.1371/aggregation/61cec9c3-10a4-4441-a110-98fb265dc0ac>
or $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203'
in <local:///topazproject#filter:graph=ri>
)
and $a <http://purl.org/dc/elements/1.1/date> $date in <local:///topazproject#filter:graph=ri>
and (
$oqltmp3_0_0_o0_f0_0_0_ <http://purl.org/dc/terms/hasPart> $a in <local:///topazproject#filter:graph=ri>
and $oqltmp3_0_0_o0_f0_0_0_ <mulgara:is> <info:doi/10.1371/aggregation/61cec9c3-10a4-4441-a110-98fb265dc0ac>
or $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203'
in <local:///topazproject#filter:graph=ri>
)
order by $date desc $a;

The journal has cross-pubbed articles which may affect how this query is generated.

Change History

Changed 17 months ago by rcave

The Ambra default journal has no articles published in it. After I published a single article into the Ambra default journal, the query changed. Now the results return quickly both in run-tql and for the journal homepage. This is the new query – there is an additional "and" in the first subquery that adds the date field:

select $cat $a $date from <local:///topazproject#filter:graph=ri> 
where $a <rdf:type> <http://rdf.topazproject.org/RDF/Article> in <local:///topazproject#filter:graph=ri> 
and $a <http://rdf.topazproject.org/RDF/hasCategory> $oqltmp2_0 in <local:///topazproject#filter:graph=ri> 
and $oqltmp2_0 <http://rdf.topazproject.org/RDF/mainCategory> $cat in <local:///topazproject#filter:graph=ri> 
and (
     $oqltmp3_0_1_o0_f0_0_0_ <http://purl.org/dc/terms/hasPart> $a in <local:///topazproject#filter:graph=ri> 
     and $oqltmp3_0_1_o0_f0_0_0_ <mulgara:is> <info:doi/10.1371/aggregation/61cec9c3-10a4-4441-a110-98fb265dc0ac> 
     or $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203' in <local:///topazproject#filter:graph=ri>) 
     and $a <http://purl.org/dc/elements/1.1/date> $date in <local:///topazproject#filter:graph=ri> 
and (
     $oqltmp3_0_0_o0_f0_0_0_ <http://purl.org/dc/terms/hasPart> $a in <local:///topazproject#filter:graph=ri> 
     and $oqltmp3_0_0_o0_f0_0_0_ <mulgara:is> <info:doi/10.1371/aggregation/61cec9c3-10a4-4441-a110-98fb265dc0ac> 
     or $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203' in <local:///topazproject#filter:graph=ri>) 
order by $date desc $a;

This the query when there are NO articles published in the Ambra default journal:

select $cat $a $date from <local:///topazproject#filter:graph=ri>
where $a <rdf:type> <http://rdf.topazproject.org/RDF/Article> in <local:///topazproject#filter:graph=ri>
and $a <http://rdf.topazproject.org/RDF/hasCategory> $oqltmp2_0 in <local:///topazproject#filter:graph=ri>
and $oqltmp2_0 <http://rdf.topazproject.org/RDF/mainCategory> $cat in <local:///topazproject#filter:graph=ri>
and (
     $oqltmp3_0_1_o0_f0_0_0_ <http://purl.org/dc/terms/hasPart> $a in <local:///topazproject#filter:graph=ri>
     and $oqltmp3_0_1_o0_f0_0_0_ <mulgara:is> <info:doi/10.1371/aggregation/61cec9c3-10a4-4441-a110-98fb265dc0ac>

     or $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203' in <local:///topazproject#filter:graph=ri>
)
and $a <http://purl.org/dc/elements/1.1/date> $date in <local:///topazproject#filter:graph=ri>
and (
     $oqltmp3_0_0_o0_f0_0_0_ <http://purl.org/dc/terms/hasPart> $a in <local:///topazproject#filter:graph=ri>
     and $oqltmp3_0_0_o0_f0_0_0_ <mulgara:is> <info:doi/10.1371/aggregation/61cec9c3-10a4-4441-a110-98fb265dc0ac>
     or $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203' in <local:///topazproject#filter:graph=ri>

)
order by $date desc $a; 

Changed 17 months ago by rcave

  • milestone 0.9.2 deleted

Workaround is to publish a single article into the Ambra default journal. Moving out of 0.9.2

Changed 17 months ago by rcave

  • priority changed from critical to medium

Changed 17 months ago by dragisak

The query for journal without cross-published articles:

select $cat $a $date from <local:///topazproject#filter:graph=ri> 
where $a <rdf:type> <http://rdf.topazproject.org/RDF/Article> in <local:///topazproject#filter:graph=ri> 
and $a <http://rdf.topazproject.org/RDF/hasCategory> $oqltmp2_0 in <local:///topazproject#filter:graph=ri> 
and $oqltmp2_0 <http://rdf.topazproject.org/RDF/mainCategory> $cat in <local:///topazproject#filter:graph=ri> 
and $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203' in <local:///topazproject#filter:graph=ri> 
and $a <http://purl.org/dc/elements/1.1/date> $date in <local:///topazproject#filter:graph=ri> 
and $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203' in <local:///topazproject#filter:graph=ri> 
order by $date desc $a;

Query when there is at least one cross-published article in the journal:

select $cat $a $date from <local:///topazproject#filter:graph=ri> 
where $a <rdf:type> <http://rdf.topazproject.org/RDF/Article> in <local:///topazproject#filter:graph=ri> 
and $a <http://rdf.topazproject.org/RDF/hasCategory> $oqltmp2_0 in <local:///topazproject#filter:graph=ri> 
and $oqltmp2_0 <http://rdf.topazproject.org/RDF/mainCategory> $cat in <local:///topazproject#filter:graph=ri> 
and (
   $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203' in <local:///topazproject#filter:graph=ri> 
   or $oqltmp3_0_1_o1_f0_0_0_ <http://purl.org/dc/terms/hasPart> $a in <local:///topazproject#filter:graph=ri> 
   and $oqltmp3_0_1_o1_f0_0_0_ <mulgara:is> <info:doi/10.1371/aggregation/61cec9c3-10a4-4441-a110-98fb265dc0ac>
) 
and $a <http://purl.org/dc/elements/1.1/date> $date in <local:///topazproject#filter:graph=ri> 
and (
   $a <http://prismstandard.org/namespaces/1.2/basic/eIssn> '1932-6203' in <local:///topazproject#filter:graph=ri> 
   or $oqltmp3_0_0_o1_f0_0_0_ <http://purl.org/dc/terms/hasPart> $a in <local:///topazproject#filter:graph=ri> 
   and $oqltmp3_0_0_o1_f0_0_0_ <mulgara:is> <info:doi/10.1371/aggregation/61cec9c3-10a4-4441-a110-98fb265dc0ac>
) 
order by $date desc $a;

Changed 10 months ago by npeterson

Paul is slating query optimization improvements for Nov. 20th. This bug should go into Topaz or Mulgara.

Changed 10 months ago by npeterson

  • status changed from new to assigned
  • owner changed from dragisak to rcave
Note: See TracTickets for help on using tickets.