On Mon, Jul 4, 2016 at 10:26 AM, Hamish Symington < ham...@lightbluesoftware.com> wrote:
> [...] If I remove all of the UPDATE rows from this trigger, and make no > other changes, the test takes approximately 12 seconds. > I don’t understand why removing code from the body of a trigger which > doesn’t fire makes things faster. > [...] I would very much like to understand what’s going on here; perhaps > someone can enlighten me. > The only thing I can think are your "select count(col) from calc" in the WHEN clause of the trigger. If we assume the number of rows in those tables are different in your two cases / runs, then the time to full-scan those (or a covering index) will increase/decrease, w/o the body of the trigger firing (because it didn't pass the WHEN clause). Nothing suggests from your post they'd be different, but that's the only thing I see that could make such a difference. FWIW. --DD _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users