Re: Informix vs. Sybase vs. Oracle vs. (gasp) MS SQL Server
Posted in 1997
Anthony Mandic (no_sp.am@agd.nsw.gov.au) wrote: : Cosmo Lee wrote: : > : > Pablo Sanchez wrote: : > : > > 2) Row level versus page level locking is all marketing hype : > : > > crap. If you want to believe, go for it... but look for : > > the problems in your application, not at the RDBMS My $0.02. To quote from Jim Gray, (_Transaction_Processing_:_Concepts_and_ Techniques_ pp. 420-21); "Many people have learned the following adage the hard way: <i> page granularity [of locks] is fine, unless you need finer granularity.</i> The virtue of page-granularity is that it is very easu to implement [for the DBMS vendor], it works well in most cases, and it can give phantom protection. . . But page-locking systems have serious problems with hotspots: if all the popular records fit onto a single page, then page-granularity locking can create hotspots." (italics his) He then goes on to list a series of examples of hot-spots. I think the point is that for 95% of the problems out there, page-level granularity is fine. However, there are cases where row-level granularity is useful, even important. Further, designing effective and efficient schemas to support page locking is a task beyond a lot of developers. Row-locks are a cheap and effective answer to their problems. KR Pb