Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
User on IDS 7.31.UD6/AIX moved indexes to a separate dbspace and expected the data dbspace to shrink, but onstat -d showed the index dbspace consumed ~570MB while the data dbspace freed only ~100KB. Replies (Art Kagel, Malc P, Neil Truby) explained that detaching indexes doesn't return pages to the dbspace free pool — the space stays allocated to the table's extents (visible via oncheck -pt/-pT); you must reorg the table (drop/recreate, ALTER FRAGMENT ... INIT IN, unload/reload) to reclaim it. The poster said his unload/reload hadn't helped and planned to reorg the biggest tables, but no follow-up results are recorded. A side question about dbschema core-dumping after detaching indexes went unanswered.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Hi All,
IDS 7.31.UD6
AIX 4.3
I recently began experimenting with detaching indexes. I was under
the impression that moving the indexes to a different dbspace would decrease
the space used in the main data dbspace.
However, this is what I found:
(4K Pgs) TableData Space Index Space
---------------------------------------------------
Before 392521 Avail 283992 Avail
After 392497 Avail 141299 Avail
As you can see, detaching the indexes used 142693 pgs (570 MB), but only
released 25 Data pages (100 KB). If the index pages were interleaved with
the data, shouldn't I get the same 500 MBs returned in the Tabledata space?
Thanks,
Michael Hoffman
P.s. -- Still awaiting any help on why detaching the indexes seems to be
causing "dbschema" to core dump with a Segmentation Fault.
↪ replying to Michael Hoffman
Neil Truby — — source: Usenet: comp.databases.informix
"Michael Hoffman" <mrh@panix.com> wrote in message
news:c01n4g$pbn$1@reader2.panix.com...
> Hi All,
>
> IDS 7.31.UD6
> AIX 4.3
>
> I recently began experimenting with detaching indexes. I was
under
> the impression that moving the indexes to a different dbspace would
decrease
> the space used in the main data dbspace.
>
> However, this is what I found:
>
> (4K Pgs) TableData Space Index Space
> ---------------------------------------------------
> Before 392521 Avail 283992 Avail
> After 392497 Avail 141299 Avail
How are you measuring the space used and available?
↪ replying to Michael Hoffman
Malc P — — source: Usenet: comp.databases.informix
Michael Hoffman <mrh@panix.com> wrote in message news:<c01n4g$pbn$1@reader2.panix.com>...
> Hi All,
>
> IDS 7.31.UD6
> AIX 4.3
>
> I recently began experimenting with detaching indexes. I was under
> the impression that moving the indexes to a different dbspace would decrease
> the space used in the main data dbspace.
<snip>
Did you drop and recreate the tables after the indexes were fragged?
> Thanks,
> Michael Hoffman
>
> P.s. -- Still awaiting any help on why detaching the indexes seems to be
> causing "dbschema" to core dump with a Segmentation Fault.
Never caused us a problem on HPUX, IDS7.31UC2 , sorry......
Malc_p
↪ replying to Michael Hoffman
Art S. Kagel — — source: Usenet: comp.databases.informix
If you are checking free space in the dbspaces, then yes, simply
detaching the indexes will not automatically release pages to the free
pool. The now unused space within the table IS free for the table to
use for more data pages (run oncheck -pt or -pT to check), but to
release the space back to the common free extent pool you have to
reorg the table to release unused pages and compress partial pages.
Art S. Kagel
Michael Hoffman wrote:
> Hi All,
>
> IDS 7.31.UD6
> AIX 4.3
>
> I recently began experimenting with detaching indexes. I was under
> the impression that moving the indexes to a different dbspace would decrease
> the space used in the main data dbspace.
>
> However, this is what I found:
>
> (4K Pgs) TableData Space Index Space
> ---------------------------------------------------
> Before 392521 Avail 283992 Avail
> After 392497 Avail 141299 Avail
>
> As you can see, detaching the indexes used 142693 pgs (570 MB), but only
> released 25 Data pages (100 KB). If the index pages were interleaved with
> the data, shouldn't I get the same 500 MBs returned in the Tabledata space?
>
> Thanks,
> Michael Hoffman
>
> P.s. -- Still awaiting any help on why detaching the indexes seems to be
> causing "dbschema" to core dump with a Segmentation Fault.
>
>
Neil,
Sorry for not explaining better: the numbers are sums of the output
from 'onstat -d' for the chunks comprising the respective dbspaces.
Michael
In <c02acq$1215fb$1@ID-162943.news.uni-berlin.de> article, Neil Truby
mentioned that:
: "Michael Hoffman" <mrh@panix.com> wrote in message
: news:c01n4g$pbn$1@reader2.panix.com...
: > Hi All,
: >
: > IDS 7.31.UD6
: > AIX 4.3
: >
: > I recently began experimenting with detaching indexes. I was
: under
: > the impression that moving the indexes to a different dbspace would
: decrease
: > the space used in the main data dbspace.
: >
: > However, this is what I found:
: >
: > (4K Pgs) TableData Space Index Space
: > ---------------------------------------------------
: > Before 392521 Avail 283992 Avail
: > After 392497 Avail 141299 Avail
: How are you measuring the space used and available?
↪ replying to Michael Hoffman
Neil Truby — — source: Usenet: comp.databases.informix
"Michael Hoffman" <mrh@panix.com> wrote in message
news:c06b7n$8ra$1@reader2.panix.com...
> Neil,
> Sorry for not explaining better: the numbers are sums of the output
> from 'onstat -d' for the chunks comprising the respective dbspaces.
>
> Michael
In which case it's for the reason Art Kagel and Malc P gave - you need to
drop and re-create the table to free up the space (or use ALTER FRAGMENT ..
INIT IN DBSPACE or some other method of re-organising the table data).
Thanks Art & Malc! I expected that to be the case, so before posting these
numbers, I onunloaded & onloaded the database. In the past, we've used
this method to reorg the entire database in one fell swoop. In this case,
the numbers did not change much at all.
I will reorg the 10 largest tables this weekend and post my results next
week.
Thanks for easing my mind that I wasn't nuts to expect the reclaimed space.
My boss was begining to doubt my skills. ;-)
Michael Hoffman
In <4026A001.9000207@erols.com> article, Art S. Kagel mentioned that:
: If you are checking free space in the dbspaces, then yes, simply
: detaching the indexes will not automatically release pages to the free
: pool. The now unused space within the table IS free for the table to
: use for more data pages (run oncheck -pt or -pT to check), but to
: release the space back to the common free extent pool you have to
: reorg the table to release unused pages and compress partial pages.
: Art S. Kagel
: Michael Hoffman wrote:
: > Hi All,
: >
: > IDS 7.31.UD6
: > AIX 4.3
: >
: > I recently began experimenting with detaching indexes. I was under
: > the impression that moving the indexes to a different dbspace would decrease
: > the space used in the main data dbspace.
: >
: > However, this is what I found:
: >
: > (4K Pgs) TableData Space Index Space
: > ---------------------------------------------------
: > Before 392521 Avail 283992 Avail
: > After 392497 Avail 141299 Avail
: >
: > As you can see, detaching the indexes used 142693 pgs (570 MB), but only
: > released 25 Data pages (100 KB). If the index pages were interleaved with
: > the data, shouldn't I get the same 500 MBs returned in the Tabledata space?
: >
: > Thanks,
: > Michael Hoffman
: >
: > P.s. -- Still awaiting any help on why detaching the indexes seems to be
: > causing "dbschema" to core dump with a Segmentation Fault.
: >
: >
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.