/** * Optimizes the performance of the database for some table. * On postgres this translates to vacuum analyze. * On h2 it does nothing. */ public void optimize(Table table) throws DaoException { optimize(table.getName()); }
@Override public void endLoad() throws DaoException { if (labelLoader != null) labelLoader.endLoad(); if (descLoader != null) descLoader.endLoad(); if (aliasLoader != null) aliasLoader.endLoad(); labelLoader = null; descLoader = null; aliasLoader = null; super.endLoad(); if (cache != null) { cache.put("wikidata-properties", properties); } wpDs.optimize(WIKIDATA_ENTITY_LABELS); wpDs.optimize(WIKIDATA_ENTITY_ALIASES); wpDs.optimize(WIKIDATA_ENTITY_DESCRIPTIONS); wpDs.optimize(WIKIDATA_STATEMENT); }
@Override public void endLoad() throws DaoException { if (labelLoader != null) labelLoader.endLoad(); if (descLoader != null) descLoader.endLoad(); if (aliasLoader != null) aliasLoader.endLoad(); labelLoader = null; descLoader = null; aliasLoader = null; super.endLoad(); if (cache != null) { cache.put("wikidata-properties", properties); } wpDs.optimize(WIKIDATA_ENTITY_LABELS); wpDs.optimize(WIKIDATA_ENTITY_ALIASES); wpDs.optimize(WIKIDATA_ENTITY_DESCRIPTIONS); wpDs.optimize(WIKIDATA_STATEMENT); }
public void optimize() throws DaoException { // Hack: wrap the datasource in a WpDataSource to access the helper method. // We don't close the WpDataSource because it doesn't own the connection. WpDataSource src = new WpDataSource(store.getDataSource()); src.optimize(SPATIAL_DB_NAME); }
public void optimize() throws DaoException { // Hack: wrap the datasource in a WpDataSource to access the helper method. // We don't close the WpDataSource because it doesn't own the connection. WpDataSource src = new WpDataSource(store.getDataSource()); src.optimize(SPATIAL_DB_NAME); }
@Override public void endLoad() throws DaoException { sync(); super.endLoad(); wpDs.optimize(Tables.META_INFO); }
@Override public void endLoad() throws DaoException { if (loader != null) { loader.endLoad(); } LOG.info("creating indexes in {}-create-indexes.sql (this can take some time)", sqlScriptPrefix); executeSqlScriptWithSuffix("-create-indexes.sql"); if (fields != null && fields.length > 0) { wpDs.optimize(fields[0].getTable()); } }