Overview Of The Optimizer <http://sqlite.org/optoverview.html> (1.0 says "column = expression" not "constant expression", 5.0 says "joins are nested loops") and the EXPLAIN QUERY PLAN output gave me this mental model:
for (d in device) for (dpi in index(dpi1, 1, d.device_id, 300)) ... Did I miss something? Chris P.S. The vast majority of dpi rows have the same type and duration, so an index on just those wouldn't help much. On 7/10/07, Joe Wilson <[EMAIL PROTECTED]> wrote:
--- Chris Eich <[EMAIL PROTECTED]> wrote: > I realize that but thought that device_id would be included because of the > d.device_id=dpi.device_id term. What am I missing? dpi.device_id is not constant. You'd be better off with this index for your query: CREATE INDEX dpi3 ON device_perf_interval( interval_type, interval_duration ); ____________________________________________________________________________________ Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------