Could you please explain how the parameter @Indexes='' should be used when we are maintaining a single index from a table?

EXECUTE dbo.IndexOptimize
@Databases = 'AdventureWorks',
@FragmentationLow = NULL,
@FragmentationLevel1 = 5,
@FragmentationLevel2 = 30,
@Indexes = ''

1 Answer 1


To update for a specific index you can use:

@Indexes = '[DatabaseName].[SchemaName].[TableName].[IndexName]'

To update for all indexes within a table you can use:

@Indexes = '[DatabaseName].[SchemaName].[TableName]'

See also: https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html for reference.

  • thank you so much for reply . I was missing to add the schema name before table name. it has been solved my problem cheers Sep 21, 2023 at 12:02
  • Welcome, don't forget to mark the answer as answer if it helped you ;)
    – Peter
    Sep 21, 2023 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.