Re: [4store] Query Plan

42 views
Skip to first unread message

Manuel Salvadores

unread,
Apr 2, 2013, 10:33:35 AM4/2/13
to 4store-...@googlegroups.com
Hi Hancel,

You can use the command 4s-query and include the flag '--explain'.

Manuel


On Thu, Mar 28, 2013 at 8:25 PM, Hancel Gonzalez <hancelg...@gmail.com> wrote:
Hi, 

i need to see the query plan. Actually, i am studying a Benchmark and that's so necesary for me.

Anyone know how to see the plan of a query?

Many thanks.

Regards, Hancel.

--
You received this message because you are subscribed to the Google Groups "4store-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 4store-suppor...@googlegroups.com.
To post to this group, send email to 4store-...@googlegroups.com.
Visit this group at http://groups.google.com/group/4store-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Hancel Gonzalez

unread,
May 17, 2013, 11:05:37 PM5/17/13
to 4store-...@googlegroups.com
Hi Manuel, 

thanks for your answer. Include the flag --explain not work for me :-(

See the output:

4s-query: unrecognized option `--explain'
4s-query revision v1.1.2
Usage: 4s-query <kbname> [-f format] [-O opt-level] [-I] [-b uri] [query]
   or: 4s-query <kbname> -P
 query is a SPARQL/LAQRS query, remember to use shell quoting if necessary
 -f              Output format one of, sparql, text, json, or testcase
 -O, --opt-level Set optimisation level, range 0-3
 -I, --insert    Interpret CONSTRUCT statements as inserts
 -r, --restricted  Enable query complexity restriction
 -s, --soft-limit  Override default soft limit on search breadth
 -d, --default-graph  Enable SPARQL default graph support
 -b, --base      Set base URI for query

Can be the version? 

Many thanks.

Regards, Hancel.

Steve Harris

unread,
May 18, 2013, 12:09:40 PM5/18/13
to 4store-...@googlegroups.com
It could be, that is a very old version!

Current is 1.1.5.

To unsubscribe from this group and stop receiving emails from it, send an email to 4store-support+u...@googlegroups.com.
To post to this group, send email to 4store-sup...@googlegroups.com.

-- 
Steve Harris, CTO
Garlik, a part of Experian
+44 7854 417 874  http://www.garlik.com/
Registered in England and Wales 653331 VAT # 887 1335 93
Registered office: Landmark House, Experian Way, Nottingham, Notts, NG80 1ZZ

Hancel Gonzalez

unread,
May 18, 2013, 3:05:21 PM5/18/13
to 4store-...@googlegroups.com
Hi and thanks for yours answers,

i installed one more recent version of 4store and exists the flag --explain but i have another  problem.

I run the command 4s-query <kb_name> -e < <query_file>

My question is: Must i write in the file with the query the clause EXPLAIN? Please, give me the syntax.

Regards, Hancel.


2013/5/18 Steve Harris <steve....@garlik.com>

--
You received this message because you are subscribed to a topic in the Google Groups "4store-support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/4store-support/iU84aGbAPFg/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to 4store-suppor...@googlegroups.com.

Steve Harris

unread,
May 20, 2013, 4:32:55 AM5/20/13
to 4store-...@googlegroups.com
You can just use whatever syntax you were using before.

If you use

$ 4s-query <kb-name> --explain

then it will be interactive (like a shell).
-- 
Steve Harris
Experian
Registered in England and Wales 653331 VAT # 887 1335 93
80 Victoria Street, London, SW1E 5JL

Hancel Gonzalez

unread,
May 20, 2013, 8:41:09 AM5/20/13
to 4store-...@googlegroups.com
Yes but i dont see the query plan. Only i see the results of the query.

Thanks Steve.


2013/5/20 Steve Harris <steve....@garlik.com>

Steve Harris

unread,
May 20, 2013, 9:33:39 AM5/20/13
to 4store-...@googlegroups.com
Sorry, yes, you're right - the query plan is only shown if you pass the query as an argument:

$ 4s-query test -f text --explain 'SELECT * WHERE { ?x <http://xmlns.com/foaf/0.1/givenname> "Stephen" . ?x <http://xmlns.com/foaf/0.1/interest> ?i } LIMIT 10'

execute 0/2: triple(variable(x), uri<http://xmlns.com/foaf/0.1/givenname>, string("Stephen")) LIMIT 998
NNNNo (_,?,_[c620b0be6e4afc2c],_[63309410bc0df058]) -> 1
1 bindings (1)
execute 1/2: triple(variable(x), uri<http://xmlns.com/foaf/0.1/interest>, variable(i)) LIMIT 998
mmmms (_,?[e1a9cfba0bd28872],_[c544a39ca3c96008],?) -> 4
4 bindings (8)
?x ?i

Note, you won't see any results, as the explain mode doesn't execute the plan to completion, just enough to see what the plan would have been.

- Steve

Hancel Gonzalez

unread,
May 20, 2013, 11:15:59 AM5/20/13
to 4store-...@googlegroups.com

Ok, i understand. But it's kinda dificult to understand the plan.

Sorry, do you know how to recognize the operators, for example, nested loop join?

Many thanks for your help.

Regards, Hancel.

Steve Harris

unread,
May 20, 2013, 11:28:40 AM5/20/13
to 4store-...@googlegroups.com
Yes, it's not easy to understand, best bet is to post it, and someone can say what it means.
Reply all
Reply to author
Forward
0 new messages