The forum will be down for maintenance over the weekend of August 18-20, 2017. The forum will be shut down on the evening (EDT) of Friday, August 18. Downtime is unknown but may be up to two days. The forum will be restarted as soon as maintenance is complete.

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
26.6k433604877
accept rate: 21%

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
8.6k117151237
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:

×81
×19

question asked: 09 Jun '11, 06:38

question was seen: 1,758 times

last updated: 06 Aug '11, 17:18