Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

In Version 8 through Version 12, does a REORGANIZE TABLE statement that does not specify an index (no PRIMARY KEY, FOREIGN KEY or INDEX clause) effectively reorganize ALL the indexes on that table while it is deleting and reinserting the rows?

If not, what effect does it have on the indexes? Does it just reorganize the clustered index, or if there is no clustered index does it just reorganize the primary key index?

Part of me says "yes, it reorganizes all the indexes, how could it avoid doing that?" ...but I don't know how iAnywhere Engineering accomplishes many wondrous things :)

Whatever the answer is, the Help should explain it: http://dcx.sybase.com/index.html#1201/en/dbreference/reorganize-table-statement.html

asked 09 Jun '11, 06:38

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050
accept rate: 20%

edited 06 Aug '11, 17:18

Well, you know the default Watcom answer: "It does what it should do":) - Aah, I see, you're merely asking what should be done?

(09 Jun '11, 07:03) Volker Barth

I have done a test, I looked at sa_index_density for a table and reorganized it. All indexes changed most have afterwards less leaf pages, but some got even more after the reorganize.

So to me it seems, that all indexes are reorganized too, not only the table pages.

permanent link

answered 09 Jun '11, 08:35

Martin's gravatar image

Martin
9.0k130169257
accept rate: 14%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×93
×19

question asked: 09 Jun '11, 06:38

question was seen: 7,874 times

last updated: 06 Aug '11, 17:18