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.

REORGANIZE TABLE PRIMARY KEY / ALTER INDEX PRIMARY KEY REBUILD

3 posts in General Discussion (old) Last posting was on 2008-08-28 09:28:21.0Z
Markus KARG Posted on 2008-08-19 08:03:56.0Z
From: "Markus KARG" <karg@quipsy.de>
Newsgroups: sybase.public.sqlanywhere
Subject: REORGANIZE TABLE PRIMARY KEY / ALTER INDEX PRIMARY KEY REBUILD
Lines: 11
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48aa7e6c$1@forums-1-dub>
Date: 19 Aug 2008 01:03:56 -0700
X-Trace: forums-1-dub 1219133036 10.22.241.152 (19 Aug 2008 01:03:56 -0700)
X-Original-Trace: 19 Aug 2008 01:03:56 -0700, vip152.sybase.com
X-Authenticated-User: panorama
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.sqlanywhere:133
Article PK: 866581

I have two questions regarding reorganization:

(1) What is the difference between "REORGANIZE TABLE x PRIMARY KEY" and
"ALTER INDEX PRIMARY KEY ON x"?

(2) Does "REORGANIZE TABLE x" include "REORGANIZE TABLE x PRIMARY KEY"?

Thanks!
Markus


Jason Hinsperger Posted on 2008-08-19 19:18:25.0Z
From: "Jason Hinsperger" <NO_jason_hinsperger_SPAM@hotmail.com>
Newsgroups: sybase.public.sqlanywhere
References: <48aa7e6c$1@forums-1-dub>
Subject: Re: REORGANIZE TABLE PRIMARY KEY / ALTER INDEX PRIMARY KEY REBUILD
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48ab1c81@forums-1-dub>
Date: 19 Aug 2008 12:18:25 -0700
X-Trace: forums-1-dub 1219173505 10.22.241.152 (19 Aug 2008 12:18:25 -0700)
X-Original-Trace: 19 Aug 2008 12:18:25 -0700, vip152.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.sqlanywhere:136
Article PK: 866584

1) "REORGANIZE TABLE x PRIMARY KEY" defragments and reorganizes the index,
and involves moving index data around in the database file, and the
statement is not logged to the transaction log. I assume you really meant to
compare this to the REBUILD clause of ALTER INDEX - "ALTER INDEX PRIMARY KEY
ON x REBUILD". The REBUILD clause of ALTER INDEX causes the entire index to
be rebuilt from scratch.

2) No, REORGANIZE TABLE x does not reorganize the primary key index.

--
Jason Hinsperger
Product Manager
Sybase iAnywhere
http://iablog.sybase.com/hinsperg

SQL Anywhere Developer Community
http://www.ianywhere.com/developer

"Markus KARG" <karg@quipsy.de> wrote in message
news:48aa7e6c$1@forums-1-dub...
>I have two questions regarding reorganization:
>
> (1) What is the difference between "REORGANIZE TABLE x PRIMARY KEY" and
> "ALTER INDEX PRIMARY KEY ON x"?
>
> (2) Does "REORGANIZE TABLE x" include "REORGANIZE TABLE x PRIMARY KEY"?
>
> Thanks!
> Markus
>


Markus KARG Posted on 2008-08-28 09:28:21.0Z
From: "Markus KARG" <karg@quipsy.de>
Newsgroups: sybase.public.sqlanywhere
References: <48aa7e6c$1@forums-1-dub> <48ab1c81@forums-1-dub>
Subject: Re: REORGANIZE TABLE PRIMARY KEY / ALTER INDEX PRIMARY KEY REBUILD
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48b66fb5@forums-1-dub>
Date: 28 Aug 2008 02:28:21 -0700
X-Trace: forums-1-dub 1219915701 10.22.241.152 (28 Aug 2008 02:28:21 -0700)
X-Original-Trace: 28 Aug 2008 02:28:21 -0700, vip152.sybase.com
X-Authenticated-User: panorama
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.sqlanywhere:137
Article PK: 866583

Jason,

thanks alot! Now I understand the difference! :-)

Regards
Markus

"Jason Hinsperger" <NO_jason_hinsperger_SPAM@hotmail.com> schrieb im
Newsbeitrag news:48ab1c81@forums-1-dub...

> 1) "REORGANIZE TABLE x PRIMARY KEY" defragments and reorganizes the index,
> and involves moving index data around in the database file, and the
> statement is not logged to the transaction log. I assume you really meant
> to compare this to the REBUILD clause of ALTER INDEX - "ALTER INDEX
> PRIMARY KEY ON x REBUILD". The REBUILD clause of ALTER INDEX causes the
> entire index to be rebuilt from scratch.
>
> 2) No, REORGANIZE TABLE x does not reorganize the primary key index.
>
> --
> Jason Hinsperger
> Product Manager
> Sybase iAnywhere
> http://iablog.sybase.com/hinsperg
>
> SQL Anywhere Developer Community
> http://www.ianywhere.com/developer
>
>
>
> "Markus KARG" <karg@quipsy.de> wrote in message
> news:48aa7e6c$1@forums-1-dub...
>>I have two questions regarding reorganization:
>>
>> (1) What is the difference between "REORGANIZE TABLE x PRIMARY KEY" and
>> "ALTER INDEX PRIMARY KEY ON x"?
>>
>> (2) Does "REORGANIZE TABLE x" include "REORGANIZE TABLE x PRIMARY KEY"?
>>
>> Thanks!
>> Markus
>>
>
>