Examples of estimateWorkloadCost()


Examples of edu.brown.costmodel.AbstractCostModel.estimateWorkloadCost()

            // Cost Estimate
            AbstractCostModel cost_model = info.getCostModel();
            assert (cost_model != null);
            cost_model.applyDesignerHints(hints);
            cost_model.clear();
            double cost = cost_model.estimateWorkloadCost(this.info.catalogContext, this.info.workload);

            // Memory Estimate
            long memory = this.info.getMemoryEstimator().estimate(this.info.catalogContext.database, info.getNumPartitions());
            assert (memory <= hints.max_memory_per_partition) : memory + " <= " + hints.max_memory_per_partition + "\n" + pplan;
            this.setUpperBounds(hints, pplan, cost, memory);
View Full Code Here

Examples of edu.brown.costmodel.SingleSitedCostModel.estimateWorkloadCost()

        for (Statement catalog_stmt : vpc.getOptimizedQueries()) {
            filter.include(catalog_stmt.getParent().getName(), 1);
        } // FOR
       
        // Calculate the cost *BEFORE* applying the vertical partition optimization
        double expected_cost = costModel.estimateWorkloadCost(clone_catalogContext, workload, filter, null);
        System.err.println("ORIGINAL COST: " + expected_cost);
        Map<Long, TransactionCacheEntry> expected_entries = new HashMap<Long, TransactionCacheEntry>();
        for (TransactionCacheEntry txn_entry : costModel.getTransactionCacheEntries()) {
            // There should be no unknown queries and all transactions should be multi-sited
            assertEquals(txn_entry.toString(), 0, txn_entry.getUnknownQueryCount());
View Full Code Here

Examples of edu.brown.costmodel.SingleSitedCostModel.estimateWorkloadCost()

        // 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);
        assertEquals(expected_entries.size(), new_entries.size());
        for (TransactionCacheEntry txn_entry : costModel.getTransactionCacheEntries()) {
View Full Code Here

Examples of edu.brown.costmodel.SingleSitedCostModel.estimateWorkloadCost()

        // order to figure
        // out where multi-site transactions are going.
        //
        SingleSitedCostModel cost_model = new SingleSitedCostModel(info.catalogContext);
        LOG.info("Generating cost model information for given PartitionPlan");
        cost_model.estimateWorkloadCost(info.catalogContext, this.info.workload);

        int num_partitions = info.catalogContext.numberOfPartitions;
        AbstractHasher hasher = new DefaultHasher(info.catalogContext, num_partitions);

        Collection<Table> roots = pplan.getNonReplicatedRoots();
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.