Skip to content

Instantly share code, notes, and snippets.

@Clijsters
Created July 15, 2022 08:34
Show Gist options
  • Save Clijsters/23ae3df45481f9a25268a7aceeab10f9 to your computer and use it in GitHub Desktop.
Save Clijsters/23ae3df45481f9a25268a7aceeab10f9 to your computer and use it in GitHub Desktop.
Get query to rebuild all indices by owner in oracle sql
with query as (
SELECT index_name FROM all_indexes where OWNER = '&owner'
)
select
'alter index &owner.'|| q.index_name || ' rebuild' || ';' cmd
from
query q;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment