Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Detect Fragmentation of a tablespace
On Thu, 23 Jul 1998 18:31:56 GMT, poohland_at_hotmail.com wrote:
Hello,maybe you can try this:
/* file:FSFI.sql
This script measures the fragmentation of free space in all of the tablespaces in a database. The formula is:
FSFI=
largest extents 1 100 * sqrt(-----------------------) * -------------------------------- sum all extents (number of extents)^1/4The ideal FSFI is 100 with no fragmentation, or at least over 30 */
select
tablespace_name,sqrt(max(blocks)/sum(blocks))*(100/sqrt(sqrt(count(blocks))))
"FSFI"
from DBA_FREE_SPACE
group by tablespace_name;
Hope this help!!!
Violin
>Hi!
>
>Is there any script that can help me to detect the fragmentation of a
>tablespace in order to decide whether I should rebuild it or not?
>
>Thank you very much in advance
>
>Winnie Liu
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
Received on Fri Jul 24 1998 - 01:16:17 CDT
![]() |
![]() |