-
Notifications
You must be signed in to change notification settings - Fork 0
Clearing Your Indexes
At this point, you should be familiar with all of the query methods and parameters that come with StackBase. However, there is logic behind the scenes that can affect performance, such as indexes.
An index is a search optimization apparatus by which SQL tables search their data more quickly. They are essentially reorganized copies of the original table ordered by a specific combination of columns, and by traversing them a target row or set of rows may be garnered quickly. Indexes are conceived in StackBase based on the searches you use, following this philosophy, and although they are crucial in accommodating a large user base creating indexes causes data upload time to increase. Running many searches that use different columns can create too many indexes, thus slowing down the overall performance of the table. To avoid this, keep your searches concise and don't create too many columns.
If you see your table slowing down, though, or you simply want to ensure your table doesn't have any unnecessary indexes, you can run a method to clear all of your table's indexes.
Declaration
-(void)clearIndexesWithCompletionBlock: (StackBaseEditCompletion)compBlock;Example
[weakSelf.table clearIndexesWithCompletionBlock:^(BOOL success, NSString *responseMessage) {
if(success){
NSLog(@"Indexes Successfully Cleared.");
}else{
NSLog(@"Index Clear Unsuccessful: %@", responseMessage);
}
}];Intro
Managing Tables
Managing Columns
Managing Rows
Conditions
Going Forward