Trigger processing priority

Trigger processing priority

Post by sshields.. » Wed, 06 Oct 1999 04:00:00



This questions is in regards to how ASE "decides" which trigger on a
given table will be executed first?  Is there a way to define trigger
order?  Do compiled triggers reside in the procedure cache?

Assumptions:
1.  A single table has 2 independent insert triggers.
2.  The insert triggers are defined on the table.

My Guess:
The order is random because a trigger is probably a specialized type of
stored procedure that becomes queued in procedure cache (FIFO).

Your input will be greatly appreciated.
Scott

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Trigger processing priority

Post by Michael Pepple » Wed, 06 Oct 1999 04:00:00



> This questions is in regards to how ASE "decides" which trigger on a
> given table will be executed first?  Is there a way to define trigger
> order?  Do compiled triggers reside in the procedure cache?

> Assumptions:
> 1.  A single table has 2 independent insert triggers.
> 2.  The insert triggers are defined on the table.

> My Guess:
> The order is random because a trigger is probably a specialized type of
> stored procedure that becomes queued in procedure cache (FIFO).

AFAIK you can only have one trigger on a table (or more specifically there's only
one trigger that can fire: there are insert, update and delete triggers so
only one of these fires based on the operation that you are executing)

Michael
--
Michael Peppler         -||-  Data Migrations Inc.

Int. Sybase User Group  -||-  http://www.isug.com


 
 
 

Trigger processing priority

Post by John Prit » Wed, 06 Oct 1999 04:00:00



>This questions is in regards to how ASE "decides" which trigger on a
>given table will be executed first?  Is there a way to define trigger
>order?  Do compiled triggers reside in the procedure cache?

>Assumptions:
>1.  A single table has 2 independent insert triggers.
>2.  The insert triggers are defined on the table.

>My Guess:
>The order is random because a trigger is probably a specialized type of
>stored procedure that becomes queued in procedure cache (FIFO).

>Your input will be greatly appreciated.
>Scott

>Sent via Deja.com http://www.deja.com/
>Before you buy.

You can only have a single insert trigger. However you can call multiple
procedures from within the trigger if you're looking at doing something like
implementing buisiness rules within the database. If you do this you'll need
to pass the contents of the inserted and deleted tables in #tables to the
procs.
 
 
 

Trigger processing priority

Post by Bret Halfor » Wed, 06 Oct 1999 04:00:00



> This questions is in regards to how ASE "decides" which trigger on a
> given table will be executed first?  Is there a way to define trigger
> order?  Do compiled triggers reside in the procedure cache?

> Assumptions:
> 1.  A single table has 2 independent insert triggers.
> 2.  The insert triggers are defined on the table.

> My Guess:
> The order is random because a trigger is probably a specialized type of
> stored procedure that becomes queued in procedure cache (FIFO).

> Your input will be greatly appreciated.
> Scott

You may only have one of each type of trigger on a table.

Currently if you create a second trigger of the same type on
a table, it silently replaces the existing one.  [behavior I am
personally not very comfortable with, but which is documented (Ref
Manual Vol 1 "create trigger")].

--
Bret Halford
Sybase Technical Support                        
3665 Discovery Drive            
Boulder, CO 80303

 
 
 

1. Change process priority / task priority permanentely

Hello there

We try to make permanent changes to how certain application programs are
run in terms of process priority.

Can a program, say MSAccess.exe always, i.e. permanentely, be run with a
higher priority than NORMAL? And how could that be done?

We appreciate any input!

Thanks a lot for your suggestions in advance!

Rgds,
Infogate AG
Benno Breit
IT

2. Why do I get Invalid column name?

3. setting OLAP Processing Priority ?

4. Will a 16K Buffer Pool Increase Performance?

5. process priority

6. FPM2.6 and Arrays

7. Priority on connection or process

8. WAS 3.0 installation

9. Setting thread priority for a process in MSSQL (MSDE 1.0)

10. process priority

11. Process Priority oracle 7.3

12. Forcing different priority to Oracle processes

13. Setting a process priority in a SQL pass through query from MS Access