Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Reorganizing tables
Dennis,
Like you said, you could analyze the table and just check avg row length.
If it's not reasonable for the number of blocks used then you are probably incurring extra IO in FTS.
I like to use DBMS_SPACE for this as well. Just remember that
EMPTY_BLOCKS
in DBA_TABLES and UNUSED_BLOCKS in DBMS_SPACE are not the
same thing. Empty blocks are emtpy and included in FTS, unused blocks
have never been used.
Jared
DENNIS WILLIAMS <DWILLIAMS_at_LIFETOUCH.COM>
Sent by: root_at_fatcity.com
03/24/2003 12:53 PM
Please respond to ORACLE-L
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc: Subject: RE: Reorganizing tables
Thanks Jared, Rachel, Tom, Dick, Prakash, Ron
Excellent points. Very much appreciated. Unfortunately at this point
people
are asking "but have you tested it?". So I need to construct some type of
test that will demonstrate how much effect a reorg will have. After I've
answered that question, then I can move on to some of the other issues
that
you mention. I have joked that if the results are strongly positive, they
won't see me much after that because I'll be touring the world selling my
performance solution that never occurred to anyone else.
Our test system is cloned from an RMAN backup of production so the
tables
should be close to production. I'm thinking of creating a new table and
copying the contents of a production table into it and then tracing
full-table scans and comparing the results.
Jared - is there a way to estimate block-level fragmentation? Comparing
the
average row length with the number of blocks used?
Dennis Williams
DBA, 40%OCP, 100% DBA
Lifetouch, Inc.
dwilliams_at_lifetouch.com
-----Original Message-----
Sent: Monday, March 24, 2003 2:30 PM
To: ORACLE-L_at_fatcity.com
Cc: DENNIS WILLIAMS
Importance: High
Dennis,
Table reorgs can be useful when there is block level fragmentation, and
you
do a lot of FTS. eg. you have a table with 1000 blocks and all the data
will actually
fit in 500 blocks.
It can also be useful for tables that change infrequently and are normally
always
sorted on the same keys. You can load them in sorted order, though at the
moment I
can't seem to recall how to do that.
Probably other reasons as well.
That said, I almost never do it myself, as I don't seem to have any
problems that
warrant it.
Our previous SAP BASIS admin was *real* big on reorgs, though she wanted
to do a whole tablespace at a time. I talked her out of it, or at least,
she sensed
that I wasn't very cooperative on that subject. :)
Jared
DENNIS WILLIAMS <DWILLIAMS_at_LIFETOUCH.COM>
Sent by: root_at_fatcity.com
03/24/2003 09:38 AM
Please respond to ORACLE-L
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
cc: Subject: Reorganizing tables
We have a new manager, and at his last employer the DBAs reorganize Oracle
tables on a regular basis. I don't reorg tables on a regular basis. He is
lobbying us to investigate this and test whether it would or wouldn't
increase performance. We are on Oracle 8.1.6, Compaq Tru64, all tables are
LMT with uniform extents. This is an OLTP system, but the users continue
to
add reports and the reports do quite a few full table scans. The reports
are
probably the critical performance issue at this time.
Dennis Williams
DBA, 40%OCP, 100% DBA
Lifetouch, Inc.
dwilliams_at_lifetouch.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: DENNIS WILLIAMS
INET: DWILLIAMS_at_LIFETOUCH.COM
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: DENNIS WILLIAMS
INET: DWILLIAMS_at_LIFETOUCH.COM
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L Received on Mon Mar 24 2003 - 16:34:27 CST
![]() |
![]() |