Although I have been able to figure out the rest of the functions, yet I am
unable to find:

while (results.hasNext() {
  results.next();
}

Can someone please give me some clue as to which file can this belong to.

I have also tried debugging the code using IDE


On Tue, Nov 26, 2013 at 2:50 PM, Rob Vesse <[email protected]> wrote:

> If you don't recognise any of this code then you can't have really used
> SPARQL with Jena before, try reading the SPARQL Tutorial -
> http://jena.apache.org/tutorials/sparql.html
>
> Rob
>
> On 26/11/2013 08:34, "Dave Reynolds" <[email protected]> wrote:
>
> >Use an IDE.
> >Dave
> >
> >On 26/11/13 07:16, Maria Jackson wrote:
> >> Thanks a lot for the help.
> >>
> >> Can you please tell me the name of the file where I can find these
> >> functions?
> >>
> >>
> >> On Mon, Nov 25, 2013 at 8:40 PM, Andy Seaborne <[email protected]> wrote:
> >>
> >>> On 25/11/13 14:23, Rob Vesse wrote:
> >>>
> >>>> Maria
> >>>>
> >>>> Yes you can do this, in ARQ the iterator which backs the ResultSet or
> >>>> Iterator<Triple> returned from the appropriate QueryExecution.execX()
> >>>> calls represents the plan and iterating over it causes the actual
> >>>> execution to occur and is thus the execution time I.e.
> >>>>
> >>>> // Assume we have a query and a dataset ready to go
> >>>> QueryExecution qe = QueryExecutionFactory.create(query, dataset);
> >>>>
> >>>> // Starting to execute the query only actually triggers plan
> >>>>calculation
> >>>> // Time around this to get the plan compilation time
> >>>> ResultSet results = qe.execSelect();
> >>>>
> >>>> // Iterating the results actually executes the query
> >>>> // Time around the while loop to get execution time
> >>>> while (results.hasNext() {
> >>>>     results.next();
> >>>> }
> >>>>
> >>>
> >>> That's the best there is.  It's not as clear cut as completely separate
> >>> plan and execute stages. Only the high-level optimizations are
> >>>measurable -
> >>> TDB specific low level optimizations happen during execution.
> >>>
> >>> The major cost for TDB is whether the file caches are hot or cold.
> >>>
> >>>          Andy
> >>>
> >>>
> >>>
> >>>> Rob
> >>>>
> >>>> p.s. Please DO NOT email/CC developers with your question as well as
> >>>> posting to the list or re-post your question multiple times,
> >>>>developers
> >>>> are all volunteers and will answer your questions as and when they
> >>>>have
> >>>> the spare time.  Also as Andy points out people are in potentially
> >>>>vastly
> >>>> difference timezones to you so you should always allow at least 24
> >>>>hours
> >>>> for a response if not longer.
> >>>>
> >>>> Emailing people directly as well as the list or multiple posting only
> >>>> serves to annoy people and actually reduces the chance that people
> >>>>will
> >>>> respond to your questions.  It also subverts the purpose of the list
> >>>>which
> >>>> is to allow any knowledgeable user the chance to respond and share
> >>>>their
> >>>> knowledge with the wider community.
> >>>>
> >>>> On 25/11/2013 08:08, "Maria Jackson" <[email protected]>
> >>>>wrote:
> >>>>
> >>>>   I need to know these query times as I am benchmarking Jena TDB
> >>>>against
> >>>>> postgreSQL. With postgresql I am able to separately retrieve the
> >>>>>query
> >>>>> execution time after the plan has been generated by postgresql using
> >>>>> \timing. It would be great if Jena could  also give me the time it
> >>>>>takes
> >>>>> to
> >>>>> retrieve the results after the plan has been generated separately by
> >>>>>Jena
> >>>>> as that would help me take a one to one comparison.
> >>>>>
> >>>>> I'll be really greatful to you for the guidance.
> >>>>>
> >>>>>
> >>>>> On Mon, Nov 25, 2013 at 5:48 AM, Maria Jackson
> >>>>> <[email protected]>wrote:
> >>>>>
> >>>>>   One can find time of query execution in Jena from tdbquery using
> >>>>>--time.
> >>>>>> But does this --time include the plan generation time. If yes, is it
> >>>>>> possible to find:
> >>>>>>    (plan generation time) and (time to retrieve the results after
> >>>>>>the
> >>>>>> plan
> >>>>>> has been generated separately in Jena)?
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>
> >
>
>
>
>
>

Reply via email to