aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPSQLExporter.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-07-08 12:10:17 +0000
committerstuconnolly <stuart02@gmail.com>2010-07-08 12:10:17 +0000
commitb71f3aa640f2a8a80b0ef4bb6a39b62b3b92f339 (patch)
tree64faf9678e572d132938acc0beed8dc878ab14f5 /Source/SPSQLExporter.m
parent20fc5e4d2d11287019984647865b6e4e0ae7a35f (diff)
downloadsequelpro-b71f3aa640f2a8a80b0ef4bb6a39b62b3b92f339.tar.gz
sequelpro-b71f3aa640f2a8a80b0ef4bb6a39b62b3b92f339.tar.bz2
sequelpro-b71f3aa640f2a8a80b0ef4bb6a39b62b3b92f339.zip
Given that the user can now decide how often a new INSERT statement is created when performing an SQL dump, replace the use of stringWithFormat: with appendString: for a potential speed improvement.
Diffstat (limited to 'Source/SPSQLExporter.m')
-rw-r--r--Source/SPSQLExporter.m8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/SPSQLExporter.m b/Source/SPSQLExporter.m
index d7a82666..ad16a119 100644
--- a/Source/SPSQLExporter.m
+++ b/Source/SPSQLExporter.m
@@ -427,8 +427,12 @@
if ((([self sqlInsertDivider] == SPSQLInsertEveryNDataBytes) && (queryLength >= ([self sqlInsertAfterNValue] * 1024))) ||
(([self sqlInsertDivider] == SPSQLInsertEveryNRows) && (k == [self sqlInsertAfterNValue])))
{
- [sqlString appendString:[NSString stringWithFormat:@");\n\nINSERT INTO %@ (%@)\nVALUES\n\t(", [tableName backtickQuotedString], [fieldNames componentsJoinedAndBacktickQuoted]]];
-
+ [sqlString appendString:@");\n\nINSERT INTO "];
+ [sqlString appendString:[tableName backtickQuotedString]];
+ [sqlString appendString:@" ("];
+ [sqlString appendString:[fieldNames componentsJoinedAndBacktickQuoted]];
+ [sqlString appendString:@")\nVALUES\n\t("];
+
queryLength = 0, k = 0;
// Use the opportunity to drain and reset the autorelease pool