Skip to content
This repository was archived by the owner on Feb 9, 2021. It is now read-only.

use PreparedStatement #5

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,12 @@ public static void optimize(Configuration conf) throws Exception {
// poll for refresh complete
boolean refreshing = true;
Long timeout = vtconfig.getOptimizePollTimeout();
PreparedStatement prepareStmt = conn.prepareStatement("select table_name, status from vt_projection_refresh");
while (refreshing) {
refreshing = false;
rs = stmt
.executeQuery("select table_name, status from vt_projection_refresh");
//rs = stmt
// .executeQuery("select table_name, status from vt_projection_refresh");
rs = prepareStmt.executeQuery();
while (rs.next()) {
String table = rs.getString(1);
String stat = rs.getString(2);
Expand Down