Skip to content

Instantly share code, notes, and snippets.

@Tracnac
Last active October 19, 2022 11:40
Show Gist options
  • Select an option

  • Save Tracnac/4c83691c0e30df1670a0f4efa6cb6e5c to your computer and use it in GitHub Desktop.

Select an option

Save Tracnac/4c83691c0e30df1670a0f4efa6cb6e5c to your computer and use it in GitHub Desktop.
Frag d'une table blocs oracle #oracle #sql
select current_block,next_block,max(level)
from (select block_id as current_block,block_id+BLOCKS as next_block from dba_extents where owner='<OWNER>' and SEGMENT_NAME='CONT' order by current_block) blocks
connect by prior next_block=current_block
group by current_block,next_block
order by current_block;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment