2

I have simple sparql query. Same query works faster on my local system, while on stage server it takes 20 sec. If I remove the order by from the query, it take 2 sec on both server. Record counts are same on both the server; approx 1,50,000.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT * WHERE
{
     ?instance rdf:type  <http://example.com/vocab/Sample>.
     ?instance rdfs:label ?label
}ORDER BY ?label OFFSET 0 LIMIT 20

setups which I have are : Hadoop, Marmotta, zookeeper, Redis, tomcat

Appreciate some help to figure out the root cause..

TallTed
  • 9,069
  • 2
  • 22
  • 37
vivek agrawal
  • 41
  • 1
  • 11
  • And what is the question now? Obviously, `ORDER BY` i.e. sorting is an expensive operation and via Hadoop it might be even more complicated when the data is distributed. I don't know what you want to hear now, especially as also did not mention any differences between your local machine and the server. Nobody knows what's difference in both of your setups – UninformedUser Jan 15 '18 at 07:28
  • By the way, what's the reason for not using one of the more common single node triple stores? Especially as the data is that small... – UninformedUser Jan 15 '18 at 07:33
  • 1
    problem was with tomcat.. after restarting the tomcat, query performance is better now. there must be some issue with GC. I have to tune that. – vivek agrawal Jan 15 '18 at 09:14
  • 150 thousand (150,000) records? or 1.5 million (1,500,000)? Doesn't seem to matter here, but solid info is key to useful assistance… – TallTed Jan 16 '18 at 16:54

0 Answers0