Re: Optimization of join between a small table and a large table

2019-08-08 Thread Julian Hyde
When you implement an equi-join as a nested loops join, the right-hand side always has a filter combining the variable set by the left-hand side and the join column on the right-hand side. You will need to do a full scan of the right-hand table every time, unless your table is organized so

Re: Optimization of join between a small table and a large table

2019-08-08 Thread Gabriel Reid
Hi Stamatis, Thank you so much, this is exactly the kind of info I was looking for! I think I can figure out how to go forward based on this, thanks again. - Gabriel On Thu, Aug 8, 2019 at 8:19 AM Stamatis Zampetakis wrote: > Hi Gabriel, > > What you want indeed seems to be a nested loop

Re: Optimization of join between a small table and a large table

2019-08-08 Thread Stamatis Zampetakis
Hi Gabriel, What you want indeed seems to be a nested loop join; there has been a relevant discussion in the dev list [1]. You may also find relevant the ongoing discussion on CALCITE-2979 [2]. Best, Stamatis [1]

Optimization of join between a small table and a large table

2019-08-07 Thread Gabriel Reid
Hi, I'm currently working on a custom Calcite adapter, and I've got a situation where I want to join a small table with a large table, basically just using the small table to filter the large table. Conceptually, I'm talking about something that is equivalent to the following query: select