Hello Mathan, I've found and tested a workaround for similar case on other dataset:
sparql [prefix declarations skipped] select * from <http://lib.uchicago.edu/campub> where { ?item local:parent ?parent ; local:text ?text . FILTER regex (?text, ' rabbit ', 'i') } order by ?parent ; caused same error. sparql [prefix declarations skipped] select * from <http://lib.uchicago.edu/campub> where { { select * where { ?item local:parent ?parent ; local:text ?text . FILTER regex (?text, ' rabbit ', 'i') } order by ?parent } } ; runs fine. The reason is that RDF literals are kept in the table of quads as compact references to a separate table but "expanded" to their full size before being returned from SPARQL request to the client. If some values are long texts then they does not fit into a temporary table of ORDER BY and thus the error happens. With a nested SELECT, sorting is before expansion. So for the query in your question the workaround may be similar: select * where { {{ select * where { ?item foaf:maker <http://webr3.org/nathan#me> ; dcterms:created ?created ; dcterms:title ?title ; rdfs:seeAlso ?link . OPTIONAL { ?item dcterms:abstract ?abstract } OPTIONAL { ?item content:encoded ?encoded } } order by desc(?created) }} Best Regards, Ivan Mikhailov OpenLink Software http://virtuoso.openlinksw.com On Fri, 2010-05-28 at 23:36 +0100, Nathan wrote: > Hi, > > Just came upon an error I don't seem to be able to get around.. > > "22026 Error SR319: Max row length is exceeded when trying to store a > string of 4951 chars into a temp col" > > when running a rather simple sparql query over a graph which contains a > mere 702 triples (quadstore contains 38,326,545 over all graphs though): > > select * where { > ?item foaf:maker <http://webr3.org/nathan#me> ; > dcterms:created ?created ; > dcterms:title ?title ; > rdfs:seeAlso ?link . > OPTIONAL { ?item dcterms:abstract ?abstract } > OPTIONAL { ?item content:encoded ?encoded } > } order by desc(?created) > > > Virtuoso version: > Version 6.1.1.3127-pthreads as of Apr 8 2010 > > Any fixes or workarounds?
