> Now you've suggested it though, I've given the suggestion
> some thought and I don't see where it can be better in all
> cases. Especially when you consider that using a
> cftransaction can potentially lock the entire table when this
> may not be necessary.
>  
> Achieving the correct level of granularity dependant on your
> situation could mean that CFLOCK in this case is better. It
> may not be, but without seeing the entire app, I cannot say
> that it isn't the right choice....

If using CFTRANSACTION would cause the entire table to be locked, running a
single INSERT, UPDATE or DELETE query would also cause the table to be
locked in most cases, I think. So, I'm not sure why you'd want to avoid
that. I would recommend letting the database do what it does best, rather
than doing that within your application. You could make the same argument
about declarative referential integrity, after all - who needs it, when you
can just ensure that relations are handled properly within your application?

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to