Re: Why does this trigger recompile frequently?

From: David Portas (REMOVE_BEFORE_REPLYING_dportas_at_acm.org)
Date: 12/08/04


Date: 8 Dec 2004 02:22:12 -0800

Cursors in triggers are a really bad idea. Can't you move whatever
logic is contained in the Trasp002 proc into the trigger. That way you
should stand a better chance of getting a well-optimised query plan.

-- 
David Portas
SQL Server MVP
--


Relevant Pages

  • Re: ACL enforcement via SP or trigger
    ... Triggers will fire if enabled. ... >> row-level security checking in a stored procedure. ... The proc determines ...
    (microsoft.public.sqlserver.security)
  • Re: simple delete statement runs forever
    ... SQL Server MVP ... "Keith Kratochvil" wrote in message ... Triggers and cursors both have their place, ...
    (microsoft.public.sqlserver.programming)
  • Re: fileevent not working with serial
    ... Should not make a difference since the filevent only triggers when TCL ... | set data ... Apart from the obvious missing close brace for the proc this should ...
    (comp.lang.tcl)
  • Indirect use of cursors
    ... 9iR1 database has been caused by the recent introduction of some PL/SQL ... The triggers typically fire on insert and/or update, ... but there's zero use of cursors as I understand ...
    (comp.databases.oracle.misc)
  • Re: for updae trigger question
    ... I will try to generate the triggers that way so the ... >> Rather than write dynamic SQL into your production code why not write ... >> David Portas ... >> SQL Server MVP ...
    (microsoft.public.sqlserver.programming)