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,


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

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


    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 <>

sqlite-users mailing list

Reply via email to