diff options
author | rowanbeentje <rowan@beent.je> | 2010-01-02 01:52:38 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-01-02 01:52:38 +0000 |
commit | e42f000e98e9ff33a91a86a3e2a0cf04c6778102 (patch) | |
tree | ab52b693e5fe7122e10536b626f18b1a48399794 /Source/TableContent.m | |
parent | 7753ee58924ee3d8da9177a1c318a28dd0bcd6d9 (diff) | |
download | sequelpro-e42f000e98e9ff33a91a86a3e2a0cf04c6778102.tar.gz sequelpro-e42f000e98e9ff33a91a86a3e2a0cf04c6778102.tar.bz2 sequelpro-e42f000e98e9ff33a91a86a3e2a0cf04c6778102.zip |
- With the improved row count support and behaviour, replace the old "Fetch correct row count" preference with a new Table row counts query level (never, only for small tables, always), defaulting to only for small tables - boundary currently set to 5MB. This addresses Issue #500
Diffstat (limited to 'Source/TableContent.m')
-rw-r--r-- | Source/TableContent.m | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m index cd780f5e..4cc301c2 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -2482,7 +2482,11 @@ checkStatusCount = YES; // Choose whether to display an estimate, or to fetch the correct row count, based on prefs - } else if ([prefs boolForKey:SPFetchCorrectRowCount]) { + } else if ([[prefs objectForKey:SPTableRowCountQueryLevel] intValue] == SPRowCountFetchAlways + || ([[prefs objectForKey:SPTableRowCountQueryLevel] intValue] == SPRowCountFetchIfCheap + && [tableDataInstance statusValueForKey:@"Data_length"] + && [[prefs objectForKey:SPTableRowCountCheapSizeBoundary] intValue] > [[tableDataInstance statusValueForKey:@"Data_length"] intValue])) + { maxNumRows = [self fetchNumberOfRows]; maxNumRowsIsEstimate = NO; [tableDataInstance setStatusValue:[NSString stringWithFormat:@"%d", maxNumRows] forKey:@"Rows"]; |