Remove-QueryIndex
This PowerShell cmdlet enables users to remove pre-defined query indexes from cached object classes or selected attributes. It is used to remove unused or obsolete indexes in order to optimize memory consumption, reduce write-time overhead, and improve overall cache performance. Removing query indexes does not affect the cached data itself but disables indexed SQL-like querying for the specified classes or attributes.
Remove-QueryIndex -CacheName [-AttributesList] -Class [-Port] [-Server] [-Credentials] [-NoLogo]
Examples
- This command removes query indexes for the class Customer.
Remove-QueryIndex -CacheName demoCache -Class Data.Customer
- This command removes query indexes for Customer class on server 20.200.20.11.
Remove-QueryIndex -CacheName demoCache -Class Data.Customer -AttributesList "CustomerID'$'FirstName" -Server 20.200.20.11
- This command removes query indexes for the class Customer using security credentials.
Remove-QueryIndex -CacheName demoCache -Class Data.Customer -Credentials (Get-Credential john_smith)
Properties
Note
The parameters with asterisk (*) on their names are the required parameters and the rest are optional.
| Parameters | Data Types | Description | Default Value |
|---|---|---|---|
-CacheName* |
<String> |
Specifies the name of the cache for which query indexing needs to be removed. Note: The cache must already exist on the source server. |
- |
-AttributesList |
<String> |
Specifies the attributes for removing query indexing. If multiple attributes are needed, they are separated by a ‘$’. | - |
-Class* |
<String> |
Specifies the name of the class for which query indexing needs to be removed. | - |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. | False |
-Port |
<Integer> |
Specifies the server port where the NCache Service is listening. | 8250 |
-Server |
<String> |
Specifies a server name where the NCache Service is running and a cache with the specified cache-name is registered. | IP of local machine |
-Credentials |
<pscredential> |
Specifies the user credentials required to authorize access for the specified operation. These credentials should belong to a user with the appropriate permissions at the node. | - |