Re: [sqlite] Merge join in SQLite

2014-06-30 Thread Richard Hipp
On Mon, Jun 30, 2014 at 9:37 AM, Eleytherios Stamatogiannakis <
est...@gmail.com> wrote:

> Thank you for the answer as well as the merge-join complexity remark. What
> about the union-all with ordered input and an order-by on the whole query?
> Does SQLite use a "merge" algorithm for that case?
>

Yes.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Merge join in SQLite

2014-06-30 Thread Eleytherios Stamatogiannakis
Thank you for the answer as well as the merge-join complexity remark. 
What about the union-all with ordered input and an order-by on the whole 
query? Does SQLite use a "merge" algorithm for that case?


Kind regards,

l.

On 26/06/14 21:45, Richard Hipp wrote:




On Thu, Jun 26, 2014 at 11:41 AM, Eleytherios Stamatogiannakis
> wrote:

Hi,

I've seen that SQLite supports the "SorterOpen" Op, to do merge
sorting. So based on that, does SQLite support merge joins when both
inputs of the join are sorted?


No, not at this time.  Note that a merge-join is more complicated than
it appears at first glance for the common case where the join key is not
unique in one or the other of the two tables being joined.


--
D. Richard Hipp
d...@sqlite.org 


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Merge join in SQLite

2014-06-26 Thread Richard Hipp
On Thu, Jun 26, 2014 at 11:41 AM, Eleytherios Stamatogiannakis <
est...@gmail.com> wrote:

> Hi,
>
> I've seen that SQLite supports the "SorterOpen" Op, to do merge sorting.
> So based on that, does SQLite support merge joins when both inputs of the
> join are sorted?
>

No, not at this time.  Note that a merge-join is more complicated than it
appears at first glance for the common case where the join key is not
unique in one or the other of the two tables being joined.


-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Merge join in SQLite

2014-06-26 Thread Eleytherios Stamatogiannakis

Hi,

I've seen that SQLite supports the "SorterOpen" Op, to do merge sorting. 
So based on that, does SQLite support merge joins when both inputs of 
the join are sorted?


Kind regards,

l.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users