322 Analyzing and Securing Social Networks
25.5.5 Breaking ties By summary statistics
We frequently face situations where we need to choose a join for multiple join options. These choices
can occur when both query plans (i.e., join orderings) require the minimum number of jobs. For
example, the query shown in Listing 6 poses such a situation.
Listing 6. Query Having a Tie Situation
?X rdf:type ub:FullProfessor
?X ub:advisorOf ?Y
?Y rdf:type ub:ResearchAssistant
The second TP in the query makes it impossible to answer and solve the query with only one job.
There are only two possible plans: we can join the rst two TPs on X rst and then join its output
with the last TP on Y, or we can join the last two patterns rst on Y and then join its out