Page-level locks

Page-level locks

am 30.11.2004 11:26:29 von Marco Mastrocinque

------=_NextPart_000_0000_01C4D723.417BDC00
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi All,

Totally stumped, what is a 'page-level lock'? Any suggestions, most
appreciated.



Thanks Marco Mastrocinque


------=_NextPart_000_0000_01C4D723.417BDC00--

Re: Page-level locks

am 30.11.2004 15:32:43 von John Paul Ashenfelter

A page-level lock (guessing you're looking at the Berkeley table
handler?) is somewhere between a table lock and a row lock. The
internals of most databases involve manipulating *pages* of data -- a
chunk of a certain size (e.g. 8 KB) that can hold data. For example,
database tables are typically retrieved from disk in page-sized
chunks. But the point is that a page is simply a chunk of a table that
contains one or more rows of data.

So a page *lock* is a lock that only affects data on a single page of
a table. For a large table, this means that rows on other pages in the
same table are *not* locked, so it's a "better" lock than a table lock
-- but rows on the same page are locked until the current operation is
complete. If you had 8KB pages (that's stuck in my head from lots of
MS SQL Server work...) then at most 8KB of a large table would be
locked for a one-row update. Better than locking the entire table, not
as good as locking the single row.

On Tue, 30 Nov 2004 21:26:29 +1100, Marco Mastrocinque
wrote:
> Hi All,
>
> Totally stumped, what is a 'page-level lock'? Any suggestions, most
> appreciated.
>
> Thanks Marco Mastrocinque
>
>


--
John Paul Ashenfelter
CTO/Transitionpoint

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org