Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseGlobalConceptStoreBuilder.java |
— | — | @@ -251,7 +251,8 @@ |
252 | 252 | String lang = localdb.getCorpus().getLanguage(); |
253 | 253 | |
254 | 254 | String sql = "DELETE FROM R " |
255 | | - + " USING "+langlinkTable.getSQLName()+" as R JOIN "+aboutTable.getSQLName()+" as A " |
| 255 | + + " USING "+langlinkTable.getSQLName()+" as R force index(language_target) " |
| 256 | + + " JOIN "+aboutTable.getSQLName()+" as A force index(resource_name) " |
256 | 257 | + " ON R.language = "+database.quoteString(lang)+" " |
257 | 258 | + " AND R.target = A.resource_name "; |
258 | 259 | |
— | — | @@ -401,7 +402,8 @@ |
402 | 403 | " R.global_concept, " + |
403 | 404 | " 1 " + |
404 | 405 | " FROM "+langlinkTable.getSQLName()+" as LL " + |
405 | | - " JOIN "+originTable.getSQLName()+" as R ON R.lang = LL.language AND R.local_concept_name = LL.target"; |
| 406 | + " JOIN "+originTable.getSQLName()+" as R force index(lang_name) " + |
| 407 | + " ON R.lang = LL.language AND R.local_concept_name = LL.target"; |
406 | 408 | |
407 | 409 | String suffix = " WHERE LL.concept != R.global_concept " |
408 | 410 | +" ON DUPLICATE KEY UPDATE langref = langref + VALUES(langref)"; |