Your "labeled" example just ran for me in 121ms.

Maybe the server gets overloaded at times and goes into disk swap? Nothing
to do with the query?

On Wed, Sep 9, 2015 at 2:06 PM James Heald <[email protected]> wrote:

> Prompted by this thread at Project Chat,
>    https://www.wikidata.org/wiki/Wikidata:Project_chat#Identical_data_sets
>
> here's a query to find multiple humans with nationality:Greece that have
> the same day of birth and day of death:
>    http://tinyurl.com/ow6lpen
> It produces one pair, and executes in about 0.6 seconds.
>
> Here's a query to try to add item numbers and labels to the previous
> search:
>    http://tinyurl.com/ovjwzc9
>
> It *just* completes, taking just over 60 seconds to execute.
>
> (Please don't merge the two items yet, because that will destroy the
> example).
>
> Analogous queries with lookups for France (71 apparent sets of
> duplicates), UK (32), and Italy(14) fail to complete.
>
>
> Two questions therefore:
> (1)  Why are the two queries taking such different times to run ?
> (2)  Is there a good way to rewrite the second to make it faster ?
>
>
> Obviously the second query as written at the moment involves a
> sub-query, which inevitably must make it a bit slower -- but given the
> solution set of the sub-query only has two rows, and an exact date for a
> given property ought to be a fairly quick key to look up, why is the
> second query taking 100 times longer than the first ?
>
> And is there a better way I should be doing this, since the query does
> appear to be producing useful real matches ?
>
> Thanks,
>
>     James.
>
>
> _______________________________________________
> Wikidata mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikidata
>
_______________________________________________
Wikidata mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata

Reply via email to