On Jul 25, 2014, at 3:14 PM, Mostafa Mokhtar <[email protected]> wrote:

> What would be the plan if we have this query?
> 
> select *
> from sales as s
> join customer as c on s.customer_id = c.customer_id
> join product as p on s.product_id = p.product_id
> join product_class as pc on p.product_class_id = pc.product_class_id
> join store as st on s.store_id = st.store_id
> where c.city = ‘San Francisco'
> 
> Where store doesn't have any filters and row count is 20.

The algorithm is currently telling me

(((product_class x product)
    x (customer x sales))
  x store)

My gut says

(store
x ((product_class x product)
    x (customer x sales)))

What do you think?

Julian

Reply via email to