----- "Bob DuCharme" <[EMAIL PROTECTED]> wrote:

> From: "Bob DuCharme" <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Friday, 31 October, 2008 6:42:22 AM GMT +10:00 Brisbane
> Subject: [Dbpedia-discussion] making a query more efficient?
>
> Sometimes the following query works, and sometimes it times out. Can 
> anyone give me any suggestions about ways to make it more efficient, or 
> at least point out which parts are most inefficient? (Besides the 
> filters, which I assume add a good deal to the required processing.)
> 
> 
>    SELECT ?s, ?artistName, ?album, ?wpURL, ?releaseDate, ?prevAlbum,
>        ?nextAlbum, ?producer, ?coverURL
>    WHERE {
>      ?s dbpedia2:artist    ?artistName;
>         dbpedia2:name      ?album;
>         foaf:page          ?wpURL;
>         dbpedia2:released  ?releaseDate;
>         dbpedia2:lastAlbum ?prevAlbum;
>         dbpedia2:nextAlbum ?nextAlbum;
>         dbpedia2:producer  ?producer;
>         dbpedia2:cover     ?coverURL.
> 
>      FILTER (regex(?artistName, "Miles")).
>      FILTER (regex(?album, "Blue")).
>    }
>    LIMIT 30

You could try FILTER ( bif:contains(?artistName, "Miles") . instead of the 
regex which aren't sourced from the text index as far as I know. The only 
inefficient bit in the query is the way the regexes are used from my naive 
position completely based on playing around with the way virtuoso handles 
different sorts of queries.

Peter

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to