![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Firstly I must admit to being constantly confused by the sheer scale of REORG complexities on both tables and indexes. I have a table that when I run 'CALL SYSPROC.REORGCHK_IX_STATS('T','USER')' on produces ***-- as F4, F5, F6, F7, F8 results on two (2) of the 5 indexes on the table. I then run ; CALL SYSPROC.ADMIN_CMD('REORG INDEXES ALL FOR TABLE x'); CALL SYSPROC.ADMIN_CMD('RUNSTATS ON TABLE x ON KEY COLUMNS WITH DISTRIBUTION ON KEY COLUMNS AND DETAILED INDEXES ALL ALLOW READ ACCESS'); I then run 'reorgchk update statistics on table x;' which shows results *---- as F4, F5, F6, F7, F8 for the indexes. If I now re-run 'CALL SYSPROC.REORGCHK_IX_STATS('T','USER')' table x is still showing ***-- as a result, where the REORGCHK results are something completely different ? Am I missing something here ? When do the stats for SYSPROC.REORGCHK_IX_STATS get updated and where do they come from ?. If I have reorg'd and runstats shouldn't they be updated especially if I have also run reorgchk with updated stats on the same table ? The algorithm that checks if a reorg is needed, does not work for small tables. |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Record count: 409k records Table def: col_1 *INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY, col_2 *VARCHAR (250) NOT NULL, col_3 *DATE NOT NULL DEFAULT CURRENT DATE, col_4 *VARCHAR (250), col_5 *VARCHAR (250), col_6 *VARCHAR (250), col_7 *VARCHAR (250), CONSTRAINT con_a PRIMARY KEY (col_1, col_2, col_3), CONSTRAINT con_b UNIQUE (col_2) Dear concern, |
|
Index: CREATE UNIQUE INDEX ind_c * * * * ON tab_a (col_2 DESC, col_1) ALLOW REVERSE SCANS; Indexes in question: Constraint con_b Index ind_c Both report ***-- as F4/5/6/7/8 in response to SYSPROC.REORGCHK_IX_STATS following a reorg indexes all for table tab_a. Following reorg on the indexes, *I have also tried to reorg the table, runstats and rebind. Still same result. |
#5
| |||
| |||
|
|
can anytell me how to grant reorg to any user, i used folowing command |
#6
| |||
| |||
|
|
On 2011-03-06 12:57, Sharif wrote: [...] can anytell me how to grant reorg to any user, i used folowing command If you look at the documentation you will find a paragraph named Authorization. For 9.5 LUW the content is: Authorization One of the following: sysadm sysctrl sysmaint dbadm CONTROL privilege on the table. You need to grant one of those to the users/groups that should be able to do reorg. It's probably a bad idea to give everyone these rights. [...] /Lennart |
![]() |
| Thread Tools | |
| Display Modes | |
| |