Forum: Other

Post: join order

join order
Debora
Jun 21, 2013
Hi,

I want run this query in voltdb:

"select
n_name as nation,
o_orderdate as o_year,
l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity as amount
from
part,supplier, lineitem, partsupp, orders, nation
where
s_suppkey = l_suppkey
and ps_suppkey = l_suppkey
and ps_partkey = l_partkey
and p_partkey = l_partkey
and o_orderkey = l_orderkey
and s_nationkey = n_nationkey
and p_name like '%olive%';

but I get this error:
"Unexpected Ad Hoc Planning Error: java.lang.RuntimeException: Error compiling query: org.voltdb.planner.PlanningErrorException: Failed to parse SQL statement: select n_name as nation, o_orderdate as o_year, l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity as amount from part,supplier, lineitem, partsupp, orders, nation where s_suppkey = l_suppkey and ps_suppkey = l_suppkey and ps_partkey = l_partkey and p_partkey = l_partkey and o_orderkey = l_orderkey and s_nationkey = n_nationkey and p_name like '%olive%' because a join of > 5 tables was requested without specifying a join order. See documentation for instructions on manually specifying a join order"

I search and I don't find how to do the join order.
Can you help me?

Thanks,
Debora