Questions tagged [cost-based-optimizer]

CBO or Cost-Based-Optimization is a collection of techniques within a RDBMS designed to evaluate numerically how expensive a SQL statement will be. Any SQL statement can be executed in different ways. Each of these ways is a possible execution plan. The CBO will assign to each plan a cost which represents a numeric evaluation of how expensive the operation will be. It will always select the plan with the lowest cost. Lowest cost in this regard logically represents the lowest elapsed time to execute such query.

For a CBO to work properly, statistics are necessary and should be maintained regularly. Oracle , Postgres, MySQL, etc are examples of RDBMS which use the CBO method to evaluate the best way to execute SQL statements.

Use this tag for questions related to execution plans of queries based on the CBO method.

75 questions
0
votes
0 answers

spark collect columns statistics for a specific partition

How can I tell spark to only collect column statistics for a specific partition? WARN SparkSqlAstBuilder: Partition specification is ignored when collecting column statistics: PARTITION(myPart='myValue') seems to ignore my filter of: ANALYZE TABLE…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
0
votes
1 answer

Oracle Cost-Based Optimizer: how to use statistics on foreign key column of fact table when criteria is on the dimension table

I am new to this community and I did search for this question. Apologies if I'm asking something that's been asked before. I am working on a dimensional data warehouse with fact tables and dimensions. This is an Oracle 12 database. The dimensions…
0
votes
1 answer

Min cost flow with edge investment cost

I want to use a python Min-Cost Flow solver to be able to construct new networks. This means that I have an initial complete graph, with the vertices being either suppliers or having a demand. Using the algorithm should tell me, based on their…
0
votes
1 answer

Cost-sensitive loss function in Tensorflow

I'm doing research for cost-sensitive neural network based on Tensorflow. But because of the static graph structure of Tensorflow. Some NN structure couldn't be realized by myself. My loss function(cost) ,cost matrix and the computational progress…
0
votes
2 answers

Vectorized form Derivation of Multiple Linear Regression Cost Function

Can some one with expertise explain how the following vectorized format of multiple linear regression is derived from given independent variable matrix with intercept X and dependent variable matrix Y, with m rows and n columns with n theta…
0
votes
1 answer

DBMS: Relational Algebra Execution Plan Cost Calculation

I have been trying the final days to come with a solution to the following question. Lets suppose that we have the following two tables. Film(ID',Title,Country,Production_Date) Actor(ID',Name,Genre,Nationality) Cast(Actor_ID',Film_ID',Role) Given…
HelloIT
  • 172
  • 2
  • 22
0
votes
0 answers

DBMS: Insert query consistency for constraints PK, FK

Lets suppose that we have a database with three tables: R(A',B,C): 100.000 records, r=100 bytes/record, bfr(R)=40 records/block, B(R)=2.500 blocks S(B',D,E): 1.000 records, r=200 bytes/record, bfr(S)= 20 records/block, B(S)=50 blocks T(C'F,G): 1.000…
HelloIT
  • 172
  • 2
  • 22
0
votes
1 answer

For loop writing over part, but not all, of previous entry in array

I'm writing a pretty simple random walk function. Whole code is below. I'm using an array to keep track of the parameter values when the current cost function is less than the previous. But for some reason, the array that's tracking the output is…
E. Case
  • 67
  • 1
  • 2
  • 11
0
votes
2 answers

dynamic sampled query in oracle db trace

i've got a huge Oracle Trace file. The application, wich produced this file, runned 1 hour and 15 minutes. In this Tracefile i found 4 Selects with together a little bit over a hour runtime. The problem is these selects are sampled by the…
hat
  • 25
  • 1
  • 10
0
votes
1 answer

How to calculate the cost of a simple select query on one database table?

Employee (ename, title, dname, address) all are string fields of the same length. The ename attribute is a candidate key. The relation contains 10,000 pages. There are 10 buffer pages. The query is: SELECT E.title, E.ename FROM Employee E WHERE…
Shayaan
  • 35
  • 1
  • 5
0
votes
1 answer

cost function - optimization matlab

I have a signal X1 = [a1,...aN] where the values [a1,....,aN] are always >0 I have other 599 signals X2, X3, ...,X600 of the same length (N) of X1. These signals could assume values >0 and <0. I know that the sum of all the 600 signals is always…
gabboshow
  • 5,359
  • 12
  • 48
  • 98
0
votes
1 answer

Solve assignment problem without cost matrix?

I need to solve an assignment problem between the pixels of two images. That means, I want to find the pixel from the left image that matches best to a given pixel in the right image. But not on a per pixel basis, but considering the overall cost of…
0
votes
1 answer

How to check cost of derby(apache in-memory datadase)

I am using memory database(derby) with spring framework. I am using that with bunch of annotations and xml. It works nice, but I am not sure my SQL is good enough or needs some optimizations. Is there anyway to check the cost of SQL with derby? (I…
Juneyoung Oh
  • 7,318
  • 16
  • 73
  • 121
0
votes
1 answer

cost-based minimization of spline with linearly-fixed points

Let me see if I can describe this problem adequately without pictures. Let's say I have two variables which both linearly affect velocity, a and b. As a increases, velocity increases linearly, and vice versa. Same goes for b- as it increases,…
-2
votes
1 answer

Is there a way to inform classifiers in R of the relative costs of misclassification?

This is a general question. Are there classifiers in R -- functions that perform classification implementing classification algorithms-- that accept as input argument the relative cost of misclassification. E.g. if a misclassification of a positive…
1 2 3 4
5