Hi,

I execute a query and I see that SQLite creates temporary data that are
never written to the disk and I am trying to understand what happens.
My query's structure looks like the following:

select
    sum()
from
    table1 t1
    table2 t2
where (
    t1.a = t2.a and ...
) or (
    t1.a = t2.a and ...
) or (
    t1.a = t2.a and ...
);

According to the documentation
https://www.sqlite.org/tempfiles.html
there are case when SQLite creates temporary data and if they are not
written to the disk it is either because of materialization of view and
subqueries or because of transient indices used to implement GROUP BY,
ORDER BY, DISTINCT, UNION, EXCEPT and INTERSECT features.
I don't see what applies to my case.

Any ides what is probably going on?

Thanks,
Nikos

Reply via email to