Proper indexes and constrains implementation strategy is essential for database performance and must be selected very carefully. Constrains support referential integrity between tables. Indexes are used for faster data access.
Procedure will display the following information:
- Table name
- Table system ID
- Existence of the primary key constrains (values 0 or 1) (PKC)
- Number of unique constrains (UNC)
- Number of foreign key constrains (FKC)
- Existence of the clustered indexes (values 0 or 1) (IND_CL)
- Number of non-clustered indexes (IND_NC)
- Special flag (*) indicating that clustered index is not defined
- Number of records in the table (approximate) (ROWCNT)
I suggest creating this procedure in master database. This way stored procedure can be called from any connection by any user defined in master database.
If you have any questions or would like to suggest how to improve this procedure feel free to contact me at firstname.lastname@example.org. You input is greatly appreciated.