aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.m
diff options
context:
space:
mode:
authorbamse16 <marius@marius.me.uk>2010-01-14 06:37:43 +0000
committerbamse16 <marius@marius.me.uk>2010-01-14 06:37:43 +0000
commit0b48b40370b5a49144f39ae95888f3fbcd1aa048 (patch)
treed8dbeff96d5c788b3342244eb122de235f7339be /Source/TableContent.m
parent08fb692301568e7143271ffad9bbcb3a5b247de5 (diff)
downloadsequelpro-0b48b40370b5a49144f39ae95888f3fbcd1aa048.tar.gz
sequelpro-0b48b40370b5a49144f39ae95888f3fbcd1aa048.tar.bz2
sequelpro-0b48b40370b5a49144f39ae95888f3fbcd1aa048.zip
Replace COUNT(*) with COUNT(1) which is usually faster, and much faster in certain conditions
Diffstat (limited to 'Source/TableContent.m')
-rw-r--r--Source/TableContent.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m
index 594822ec..5f3f7759 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -2103,7 +2103,7 @@
NSInteger numberOfRows = 0;
// Get the number of rows in the table
MCPResult *r;
- r = [mySQLConnection queryString:[NSString stringWithFormat:@"SELECT COUNT(*) FROM %@", [selectedTable backtickQuotedString]]];
+ r = [mySQLConnection queryString:[NSString stringWithFormat:@"SELECT COUNT(1) FROM %@", [selectedTable backtickQuotedString]]];
if ([[mySQLConnection getLastErrorMessage] isEqualToString:@""]) {
NSArray *a = [r fetchRowAsArray];
if([a count])