I need to send a query to Fuseki server from Java ans ARQ is taking too
much time parsing and executing a simple query to Fuseki Server. This is my
code:

long before=new java.util.Date().getTime();
        Query query =
QueryFactory.create(OntologyAcces.PREFIXES+"SELECT *{?s ?p ?o} LIMIT
1000");
        long after=new java.util.Date().getTime();
        System.out.println("Parsing: "+(after-before));

        QueryExecution qexec =
QueryExecutionFactory.sparqlService(OntologyAcces.HOST_QUERY, query);

        ResultSet results = null;

        try{
            long beforeE=new java.util.Date().getTime();
            results = qexec.execSelect();
            long afterE=new java.util.Date().getTime();
            System.out.println("Execution: "+(afterE-beforeE));

//          ResultSetFormatter.out(System.out, results, query) ;
            for(;results.hasNext();){
                QuerySolution qs = results.nextSolution();
                //System.out.println("I'm the subject: "+qs.getResource("s"));

            }
            qexec.close();
        } catch (Exception e) {
            e.printStackTrace(); }


The parsing is taking up to 1000 ms and te execution is taking up to 200
ms. The triple store answer is not taking much time, the trouble I have is
with ARQ specifically.
-- 
*FEDERICO LÓPEZ GÓMEZ*
Estudiante Ingeniería de Sistemas
Universidad del Valle - Sede Tuluá

Reply via email to