Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

The Ultimate Index Width Stats Reporter

By Jesse Roberge, 2009/01/28

Util_IndexWidth
By Jesse Roberge - YeshuaAgapao@Yahoo.com

Reports index length stats for indexes who's lengths exceeding parameterized thresholds (defaults to 0 - get all) for
total length and seek length, optionally filtering schemas and tables.

Required Input Parameters:
none

Optional Input Parameters:
@SchemaName sysname='' Filters schemas. Can use LIKE wildcards. All schemas if blank. Accepts LIKE Wildcards.
@TableName sysname='' Filters tables. Can use LIKE wildcards. All tables if blank. Accepts LIKE Wildcards.
@MaxLength int=0 Limits output to indexes with sum of all column max lengths exceeding this (OR with @SeekMaxLength)
@SeekMaxLength int=0 Limits output to indexes with sum of seek column max lengths exceeding this (OR with @MaxLength)

Usage
EXECUTE Util_IndexWidth 'dbo', 'order%', @MaxLength=250, @SeekMaxLength=100

Copyright:
Licensed under the L-GPL - a weak copyleft license - you are permitted to use this as a component of a proprietary database and call this from proprietary software.
Copyleft lets you do anything you want except plagarize, conceal the source, proprietarize modifications, or prohibit copying & re-distribution of this script/proc.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

see <http://www.fsf.org/licensing/licenses/lgpl.html> for the license text.

Total article views: 1624 | Views in the last 30 days: 9
 
Related Articles
FORUM

WildCard Expression

Use Wildcard instead of repeating each expression possibility

FORUM
SCRIPT

The Ultimate Duplicate Index Finder

Searches database-wide for multiple indexes in the same table which has the same column as the first...

 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones