Re: counting rows
From: Tony Rogerson <tonyrogerson_at_sqlserverfaq.com>
Date: Sun, 2 Apr 2006 10:54:00 +0100
Message-ID: <e0o6vk$5p2$1$8300dec7_at_news.demon.co.uk>
Date: Sun, 2 Apr 2006 10:54:00 +0100
Message-ID: <e0o6vk$5p2$1$8300dec7_at_news.demon.co.uk>
So how on earth can anybody insert a row for that user if you are in the middle of a COUNT(*)?
-- Tony Rogerson SQL Server MVP http://sqlserverfaq.com - free video tutorials "E. Lefty Kreouzis" <lefty_at_goedel.home.rtfm.gr> wrote in message news:slrne2v1io.qol.lefty_at_goedel.home.rtfm.gr...Received on Sun Apr 02 2006 - 11:54:00 CEST
>
> Just to make things clear I did the test on 3 databases using 2 long
> running transactions. The results were as follows:
>
> Database Isolation Level Result
> Oracle 10g Read committed No locking
> PostgreSQL Read committed No Locking
> PostgreSQL Serializable No Locking
> SQL Server 2000 default (read commited?) Deadlock
>
> The above was done using the default implementation of count(*) for
> each database. My claim is that using a trigger would result in
> locking for all cases just because the trigger would update the
> /same/ row.
>
> Lefty Kreouzis