The output of EXPLAIN QUERY PLAN doesn't change when I use the CROSS JOIN
trick to disable table reordering:

sqlite> explain query plan SELECT d.device_type, dpi.* FROM device d,
device_perf_interval dpi WHERE d.device_id=dpi.device_id AND
dpi.interval_type=1 AND dpi.interval_duration=300;
0|0|TABLE device AS d
1|1|TABLE device_perf_interval AS dpi WITH INDEX dpi2
sqlite> explain query plan SELECT d.device_type, dpi.* FROM device d CROSS
JOIN device_perf_interval dpi WHERE d.device_id=dpi.device_id AND
dpi.interval_type=1 AND dpi.interval_duration=300;
0|0|TABLE device AS d
1|1|TABLE device_perf_interval AS dpi WITH INDEX dpi2

Perhaps I'm misinterpreting this output; can someone elucidate for me?

Chris

On 7/10/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote:

It's pretty clear that the actual execution plan chosen by SQLite is
along the lines of

for (dpi in index(dpi2, 1, any, any, any))
    for (d in device(device_id = dpi.device_id))
        ...

Igor Tandetnik



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]

-----------------------------------------------------------------------------


Reply via email to