Examples of applyUpdate()


Examples of edu.brown.catalog.special.VerticalPartitionColumn.applyUpdate()

        double expected_cost = costModel.estimateWorkloadCost(clone_catalogContext, workload, filter, null);
        System.err.println("ORIGINAL COST: " + expected_cost);
       
        // Now apply the update and get the new cost. It should be lower
        // We have to clear the cache for these queries first though
        vpc.applyUpdate();
        costModel.invalidateCache(vpc.getOptimizedQueries());
        double new_cost = costModel.estimateWorkloadCost(clone_catalogContext, workload, filter, null);
        System.err.println("NEW COST: " + new_cost);
        assert(new_cost < expected_cost) : String.format("%f < %f", new_cost, expected_cost);
    }
View Full Code Here

Examples of edu.brown.catalog.special.VerticalPartitionColumn.applyUpdate()

       
        // Now apply the update and get the new cost. We don't care what the cost
        // is because SingleSitedCostModel only looks to see whether a txn is single-partition
        // and not how many partition it actually touches
        // We have to clear the cache for these queries first though
        vpc.applyUpdate();
        costModel.invalidateCache(vpc.getOptimizedQueries());
        double new_cost = costModel.estimateWorkloadCost(clone_catalogContext, workload, filter, null);
        System.err.println("NEW COST: " + new_cost);
        Collection<TransactionCacheEntry> new_entries = costModel.getTransactionCacheEntries();
        assertNotNull(new_entries);
View Full Code Here

Examples of edu.brown.catalog.special.VerticalPartitionColumn.applyUpdate()

            assertEquals(CatalogUtil.getNumberOfPartitions(clone_db), partitions.size());
        } // FOR
       
        // Now apply the optimized queries
        // The number of partitions that our Statements touch should be reduced to one
        vpc.applyUpdate();
        assert(vpc.isUpdateApplied());
        for (Statement catalog_stmt : vpc.getOptimizedQueries()) {
            Object params[] = stmt_params.get(catalog_stmt);
            assertNotNull(params);
            PartitionSet partitions = new PartitionSet();
View Full Code Here

Examples of edu.brown.catalog.special.VerticalPartitionColumn.applyUpdate()

            fields_before.put(catalog_stmt, this.generateFieldMap(catalog_stmt));
        } // FOR
//        System.err.println("BEFORE:\n" + StringUtil.formatMaps(fields_before));
       
        // AFTER!
        MaterializedViewInfo catalog_view = vpc.applyUpdate();
        assertNotNull(catalog_view);
        assertEquals(CatalogUtil.getVerticalPartition(catalog_tbl), catalog_view);
        for (Statement catalog_stmt : vpc.getOptimizedQueries()) {
            Map<String, Object> before_m = fields_before.get(catalog_stmt);
            assertNotNull(before_m);
View Full Code Here

Examples of edu.brown.catalog.special.VerticalPartitionColumn.applyUpdate()

                        current_col = search_col;
                        vp_col = (VerticalPartitionColumn) search_col;
                        assert (CatalogUtil.getDatabase(vp_col).equals(info.catalogContext.database)) : String.format("VP_COL[%d] != INFO[%d]", CatalogUtil.getDatabase(vp_col).hashCode(),
                                info.catalogContext.database.hashCode());

                        MaterializedViewInfo catalog_view = vp_col.applyUpdate();
                        assert (catalog_view != null) : "Unexpected null MaterializedViewInfo for " + current_tbl + " vertical partition:\n" + vp_col;
                        if (this.cost_model.isCachingEnabled()) {
                            if (trace.val)
                                LOG.trace("Invalidating VerticalPartition Statements in cost model: " + vp_col.getOptimizedQueries());
                            this.cost_model.invalidateCache(vp_col.getOptimizedQueries());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.