RE: rebuild indexes

From: Uzzell, Stephan <SUzzell_at_MICROS.COM>
Date: Fri, 18 Apr 2014 18:46:16 +0000
Message-ID: <e9f3cefd90454bc89905cd91a18cbc2a_at_USMAIL2K1303.us.micros.int>



Well, this could be one of the valid use cases for a shrink / move: if the table is a queue type table (either AQ or homegrown), it may currently have only 14 rows or some such. But it there ever was a time when the dequeue stopped or failed, the table could have grown ridiculously. If there’s no appropriate index (or none whatsoever, perhaps, because a queue table should never have more than a handful of rows) then Oracle will have to read up to the HWM, and if that got pushed out pretty far, that could well cause a performance issue.

Stephan Uzzell

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Jeffrey Beckstrom Sent: Friday, 18 April, 2014 14:15
Cc: oracle-l (oracle-l_at_freelists.org) Subject: Re: rebuild indexes

How many blocks is the table occupying? For the number of rows you list, it can't be more than a block or two and would probably save little.

>>> Andy Gmail <andrew.kerber_at_gmail.com<mailto:andrew.kerber_at_gmail.com>> 4/18/14 2:05 PM >>>
Yes. Just run alter table move tablespace whatever then rebuild the indexes. That will accomplish what you need.

Sent from my iPhone

On Apr 18, 2014, at 12:37 PM, "Zelli, Brian" <Brian.Zelli_at_RoswellPark.org<mailto:Brian.Zelli_at_RoswellPark.org>> wrote: One table has 14 rows and the other has 26. They say it is causing performance issues…… Brian
From: Andrew Kerber [mailto:andrew.kerber_at_gmail.com] Sent: Friday, April 18, 2014 1:37 PM
To: Zelli, Brian
Cc: oracle-l (oracle-l_at_freelists.org<mailto:oracle-l_at_freelists.org>) Subject: Re: rebuild indexes
How big is the table? He probably wants you to shrink it by eliminating unused blocks. The simplest way to do that is by an alter table move command followed by alter index rebuild.

Sent from my iPad

On Apr 18, 2014, at 12:26 PM, "Zelli, Brian" <Brian.Zelli_at_RoswellPark.org<mailto:Brian.Zelli_at_RoswellPark.org>> wrote: A vendor wants me to shrink a table. I’ve never shrunk one in oracle. Does that delete the data out of them? And then wants me to rebuild the associated indexes. Won’t they be empty after you shrink them? Brian

This email message may contain legally privileged and/or confidential information. If you are not the intended recipient(s), or the employee or agent responsible for the delivery of this message to the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or use of this email message is prohibited. If you have received this message in error, please notify the sender immediately by e-mail and delete this email message from your computer. Thank you.

This email message may contain legally privileged and/or confidential information. If you are not the intended recipient(s), or the employee or agent responsible for the delivery of this message to the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or use of this email message is prohibited. If you have received this message in error, please notify the sender immediately by e-mail and delete this email message from your computer. Thank you.

.

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Apr 18 2014 - 20:46:16 CEST

Original text of this message