Re: [sqlite] what is most effective way to temporarily disable triggers?

2009-07-09 Thread Martin.Engelschalk
Hi, if you are talking about a feature request: Oracle supports sql syntax to enable or disable a certain trigger (as opposed to all triggers as you suggested): ALTER TRIGGER DISABLE or ALTER TRIGGER ENABLE This would be nice. Martin Michal Seliga schrieb: > hi > > attached is patch which

Re: [sqlite] what is most effective way to temporarily disable triggers?

2009-07-09 Thread Michal Seliga
hi attached is patch which will make temporary disable of triggers possible. i tried it in my application with current data (many inserts in to various table with many triggers on them, which are not meant to be run while importing data). it works and it changed running time from 62 seconds to 4,

Re: [sqlite] what is most effective way to temporarily disable triggers?

2009-07-09 Thread Michal Seliga
hi attached is patch which will make temporary disable of triggers possible. i tried it in my application with current data (many inserts in to various table with many triggers on them, which are not meant to be run while importing data). it works and it changed running time from 62 seconds to 4,

Re: [sqlite] what is most effective way to temporarily disable triggers?

2009-06-24 Thread Michal Seliga
D. Richard Hipp wrote: > On Jun 24, 2009, at 10:35 AM, Michal Seliga wrote: >>> Instead of >>> >>> WHEN not exists(SELECT * FROM ) >>> >>> create an application-defined function (perhaps called >>> "enable_triggers()") that returns either 1 or 0 depending on the >>> setting of some

Re: [sqlite] what is most effective way to temporarily disable triggers?

2009-06-24 Thread P Kishor
On Wed, Jun 24, 2009 at 9:17 AM, Michal Seliga wrote: > hi > > in my application i sometimes must insert huge amount of pre-prepared data so > i > don't want triggers to do any action while i am inserting them > > for this reason i created one small table which is

Re: [sqlite] what is most effective way to temporarily disable triggers?

2009-06-24 Thread D. Richard Hipp
On Jun 24, 2009, at 10:35 AM, Michal Seliga wrote: >> >> Instead of >> >> WHEN not exists(SELECT * FROM ) >> >> create an application-defined function (perhaps called >> "enable_triggers()") that returns either 1 or 0 depending on the >> setting of some variable in your application. Then

Re: [sqlite] what is most effective way to temporarily disable triggers?

2009-06-24 Thread Michal Seliga
D. Richard Hipp wrote: > On Jun 24, 2009, at 9:17 AM, Michal Seliga wrote: > >> hi >> >> in my application i sometimes must insert huge amount of pre- >> prepared data so i >> don't want triggers to do any action while i am inserting them >> >> for this reason i created one small table which

Re: [sqlite] what is most effective way to temporarily disable triggers?

2009-06-24 Thread D. Richard Hipp
On Jun 24, 2009, at 9:17 AM, Michal Seliga wrote: > hi > > in my application i sometimes must insert huge amount of pre- > prepared data so i > don't want triggers to do any action while i am inserting them > > for this reason i created one small table which is normally empty, > however if it

[sqlite] what is most effective way to temporarily disable triggers?

2009-06-24 Thread Michal Seliga
hi in my application i sometimes must insert huge amount of pre-prepared data so i don't want triggers to do any action while i am inserting them for this reason i created one small table which is normally empty, however if it contains record set to 1 triggers shoudl not do any action. to make