This code take a very long time to run. I have roughly 100,000 records. Each step takes roughly the same mount of time.... get the result from FMResultSet and reading it into the 3 arrays. I tried using two select statements. One to get the result count and then allocating that amount in the mutableArray. No performance difference. Any suggestions to improve speed?
FMResultSet *results = [database executeQuery:@"SELECT FriendlyName, Serial, Barcode FROM Inventory, Company WHERE Inventory.friendlyName <> '' AND Company.CompanyID = Inventory.companyID AND Company.CompanyName = ?", selectedCompany];
arrayFriendlyName =[[NSMutableArray alloc]init];
arraySerial = [[NSMutableArray alloc]init];
arrayBarcode = [[NSMutableArray alloc]init];
while([results next]) {
[arrayFriendlyName addObject:[results stringForColumn:@"FriendlyName"]];
[arrayBarcode addObject:[results stringForColumn:@"Barcode"]];
[arraySerial addObject:[results stringForColumn:@"Serial"]];
}
[database close];