Skip to content

Instantly share code, notes, and snippets.

@BirgittaHauser
Created October 31, 2019 09:23
Show Gist options
  • Save BirgittaHauser/1d57fda8d7af74bbf0d8607d80d79431 to your computer and use it in GitHub Desktop.
Save BirgittaHauser/1d57fda8d7af74bbf0d8607d80d79431 to your computer and use it in GitHub Desktop.
Determine DDS described physical files containing Unique Keys
-- Determine DDS described physical files with unique Keys
Select a.*
From syspartitionIndexstat a
Where Table_Schema = 'YOURSCHEMA'
and Index_Type = 'PHYSICAL'
and UNIQUE = '0';
@BirgittaHauser
Copy link
Author

Determine DDS described physical files containing Unique Keys

@BirgittaHauser
Copy link
Author

For determining DDS described physical files with a non-unique key, UNIQUE = '2' must be checked.
-- Determine DDS described physical files with non-unique Keys

Select a.* 
From syspartitionIndexstat a
Where     Table_Schema = 'YOURSCHEMA' 
      and Index_Type   = 'PHYSICAL' 
      and UNIQUE       = '2';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment