dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19316
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8368: Added vacuum statement to StatementManager
------------------------------------------------------------
revno: 8368
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-10-03 20:11:23 +0200
message:
Added vacuum statement to StatementManager
modified:
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementBuilder.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/H2StatementBuilder.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/MySQLStatementBuilder.java
dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/PostgreSQLStatementBuilder.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementBuilder.java 2012-09-27 13:00:26 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/StatementBuilder.java 2012-10-03 18:11:23 +0000
@@ -47,6 +47,15 @@
String encode( String value );
/**
+ * Returns statement for vacuum and analyze operations for a table. Returns
+ * null if such statement is not relevant.
+ *
+ * @param table the table to vacuum.
+ * @return vacuum and analyze operations for a table.
+ */
+ String getVacuum( String table );
+
+ /**
* Returns the name of a double column type.
* @return the name of a double column type.
*/
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/H2StatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/H2StatementBuilder.java 2012-09-27 13:00:26 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/H2StatementBuilder.java 2012-10-03 18:11:23 +0000
@@ -43,6 +43,11 @@
{
return "DOUBLE";
}
+
+ public String getVacuum( String table )
+ {
+ return null;
+ }
public String getPeriodIdentifierStatement( Period period )
{
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/MySQLStatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/MySQLStatementBuilder.java 2012-09-27 13:00:26 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/MySQLStatementBuilder.java 2012-10-03 18:11:23 +0000
@@ -44,6 +44,11 @@
return "DECIMAL";
}
+ public String getVacuum( String table )
+ {
+ return null;
+ }
+
public String getPeriodIdentifierStatement( Period period )
{
return
=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/PostgreSQLStatementBuilder.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/PostgreSQLStatementBuilder.java 2012-09-27 13:00:26 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/PostgreSQLStatementBuilder.java 2012-10-03 18:11:23 +0000
@@ -43,6 +43,11 @@
{
return "DOUBLE PRECISION";
}
+
+ public String getVacuum( String table )
+ {
+ return "vacuum analyze " + table + ";";
+ }
public String getPeriodIdentifierStatement( Period period )
{
@@ -321,5 +326,4 @@
{
return "firstname || ' ' || middleName || ' ' || lastname";
}
-
}