aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-02-24 23:24:26 +0000
committerrowanbeentje <rowan@beent.je>2009-02-24 23:24:26 +0000
commit27285b94decd7e3ce6e6600ee074e92bd0449f7d (patch)
treefa1910bc357a2c3a82bc1a1fc5474eb4fc0d1a70 /Source/TableContent.m
parentbf15cc38766128464dae8af97b79991ecf26a58f (diff)
downloadsequelpro-27285b94decd7e3ce6e6600ee074e92bd0449f7d.tar.gz
sequelpro-27285b94decd7e3ce6e6600ee074e92bd0449f7d.tar.bz2
sequelpro-27285b94decd7e3ce6e6600ee074e92bd0449f7d.zip
Replaces COUNT(*) with COUNT(1), which reportedly shows a speed increase on certain tables and views. (Thanks to Marius Ursache for this patch)
Diffstat (limited to 'Source/TableContent.m')
-rw-r--r--Source/TableContent.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m
index 045d75ca..5876141c 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -1530,10 +1530,10 @@
- (int)fetchNumberOfRows
/*
- fetches the number of rows in the selected table using a "SELECT COUNT(*)" query and return it
+ fetches the number of rows in the selected table using a "SELECT COUNT(1)" query and return it
*/
{
- return [[[[mySQLConnection queryString:[NSString stringWithFormat:@"SELECT COUNT(*) FROM `%@`", selectedTable]] fetchRowAsArray] objectAtIndex:0] intValue];
+ return [[[[mySQLConnection queryString:[NSString stringWithFormat:@"SELECT COUNT(1) FROM `%@`", selectedTable]] fetchRowAsArray] objectAtIndex:0] intValue];
}