Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

On rowlock table does ASE still locks the page for a moment?

3 posts in General Discussion Last posting was on 2013-01-03 22:05:55.0Z
Sid. Posted on 2013-01-03 21:34:05.0Z
Sender: 50a1.50e5f49d.1804289383@sybase.com
From: Sid.
Newsgroups: sybase.public.ase.general
Subject: On rowlock table does ASE still locks the page for a moment?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50e5f94d.5247.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 3 Jan 2013 13:34:05 -0800
X-Trace: forums-1-dub 1357248845 172.20.134.41 (3 Jan 2013 13:34:05 -0800)
X-Original-Trace: 3 Jan 2013 13:34:05 -0800, 172.20.134.41
Lines: 6
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31623
Article PK: 1158719

On row lock table do we still get page lock for the duration
when ASE inserts data into the page and calculates the start
position next row? How does it work?

Thanks,
Sid.


Sid. Posted on 2013-01-03 21:44:35.0Z
Sender: 52ed.50e5fb09.1804289383@sybase.com
From: Sid.
Newsgroups: sybase.public.ase.general
Subject: Re: On rowlock table does ASE still locks the page for a moment?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50e5fbc3.5326.1681692777@sybase.com>
References: <50e5f94d.5247.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 3 Jan 2013 13:44:35 -0800
X-Trace: forums-1-dub 1357249475 172.20.134.41 (3 Jan 2013 13:44:35 -0800)
X-Original-Trace: 3 Jan 2013 13:44:35 -0800, 172.20.134.41
Lines: 9
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31624
Article PK: 1158720


> On row lock table do we still get page lock for the
> duration when ASE inserts data into the page and
> calculates the start position next row? How does it work?
>
> Thanks,
> Sid.

Can it update the offset table for multiple rows and be able
to insert them symaltaniously?


Rob V Posted on 2013-01-03 22:05:55.0Z
From: Rob V <rob@sypron.nl>
Reply-To: rob@sypron.nl
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: On rowlock table does ASE still locks the page for a moment?
References: <50e5f94d.5247.1681692777@sybase.com> <50e5fbc3.5326.1681692777@sybase.com>
In-Reply-To: <50e5fbc3.5326.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <50e600c3$1@forums-1-dub>
Date: 3 Jan 2013 14:05:55 -0800
X-Trace: forums-1-dub 1357250755 172.20.134.152 (3 Jan 2013 14:05:55 -0800)
X-Original-Trace: 3 Jan 2013 14:05:55 -0800, vip152.sybase.com
Lines: 47
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31625
Article PK: 1158723


On 03-Jan-2013 22:44, Sid. wrote:
>> On row lock table do we still get page lock for the
>> duration when ASE inserts data into the page and
>> calculates the start position next row? How does it work?
>>
>> Thanks,
>> Sid.
>
> Can it update the offset table for multiple rows and be able
> to insert them symaltaniously?
>

With row locking, there is no page lock. There is a transactional lock
on the row being accessed (and an intent lock on the table, as always).

With row locking, ASE uses a 'latch' (a nontransactional short-duration
mutex mechanism) when changing a data page or index page (any aspect of it).

Clearly the row offset table can be changed by only one session at a
time and the latch mechanism is used to synchronize these. Because a
latch is not transactional, multiple transactions can modify one and the
same data page concurrently.

In most cases, only one row will be modified at a time, even for DML
statements that modify multiple rows. I think the exceptions are the
bulk operations (select-into, alter table, reorg, BCP) which use a
different way of filling dataoages with new rows, but in those cases the
new data page is accessed by a single session at a time only.

--
HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Professional DBA for Sybase ASE, IQ, Replication Server

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase IQ Quick Reference Guide"
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------