On Mon, Jul 4, 2016 at 1:18 PM, R Smith <rsm...@rsweb.co.za> wrote:

> On 2016/07/04 1:13 PM, Dominique Devienne wrote:
>
>> On Mon, Jul 4, 2016 at 12:08 PM, Hick Gunter <h...@scigames.at> wrote:
>>
>>> A simple UPDATE <table> set <field>=<value> where <key_condition> will
>>> translate into about 40 instructions; adding your trigger adds an
>>> additional estimated 400 instructions of trigger program.
>>>
>> But the question is whether these extra VDBE instructions can cause
>> slowdowns, even when not executed at runtime? (i.e. branch using them is
>> not taken).
>
> The slowness is not due to the Trigger code being skipped or executed...
> The slowness is resulting from the trigger code having to be compiled into
> the statement. Whether or not it gets executed might affect another layer
> of slowdown, but not in the OP's case.


Ah ah, I see it now, thanks! --DD

PS: I never worry about SQLite's parser performance (because I'm binding in
part),
but in this case it's akin to compiling a dozen different statements,
with the associated name lookups and execution plan building,
so it could add up if done in a tight loop indeed. Great insights. Thanks
again.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to