Since all data used in the INSERT
statement comes from your 'SELECT' statements there is no point in taking the extra round-trip between your java app and the database. Executing everything in one SQL statement will give you the best performance.
Your SQL statement should be like this
INSERT INTO snomedinfo_data (refid,id,effectivetime,active,moduleid,conceptid,languagecode,typeid,term,caseSignificanceid)
SELECT d.refid, d.id, d.effectivetime, d.active, d.moduleid, d.conceptid, d.languagecode, d.typeid, d.term, d.caseSignificanceid
FROM snomed_descriptiondata d
JOIN snomed_conceptdata c ON c.id = d.conceptid AND c.active = 1 AND d.active = 1
And your java code can be boiled down to this
try {
oRoot = Root.createDbConnection(null);
String sql = "INSERT INTO snomedinfo_data...";
oPrStmt = oRoot.con.prepareStatement(sql);
oPrStmt.executeUpdate();
}