mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-19 13:43:22 +00:00
Don't query content table when not required
When only requesting the c_name field, limit the SQL query to the quick table.
This commit is contained in:
@@ -107,6 +107,7 @@ static GCSStringFormatter *stringFormatter = nil;
|
||||
while ((field = [fields nextObject]))
|
||||
{
|
||||
fieldName = [field columnName];
|
||||
|
||||
if (![fieldName isEqualToString: @"c_name"])
|
||||
[quickFieldNames addObject: fieldName];
|
||||
}
|
||||
@@ -116,7 +117,9 @@ static GCSStringFormatter *stringFormatter = nil;
|
||||
while ((field = [fields nextObject]))
|
||||
{
|
||||
fieldName = [field columnName];
|
||||
[contentFieldNames addObject: fieldName];
|
||||
|
||||
if (![fieldName isEqualToString: @"c_name"])
|
||||
[contentFieldNames addObject: fieldName];
|
||||
}
|
||||
|
||||
folderId = [_folderId copy];
|
||||
|
||||
Reference in New Issue
Block a user