Sorting method of multiple predicates
A predicate and sequence technology, applied in the field of sorting multiple predicates, can solve the problems of low operation efficiency and high CPU overhead, and achieve the effect of reducing overhead and improving execution efficiency.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0049] There are columns A, B, and C in table T1 of the database, and they are all integer data. Currently, the SQL to be processed is as follows:
[0050] SELECT A, B, C FROM T1 WHERE A>10 AND power(B, 2)>100 AND power(C, 3)>1000;
[0051] Among them, power is a function for exponentiation, power(B, 2) is to find the square of B, and power(C, 3) is to find the cube of C.
[0052] The statement has gone through the analysis stage and the optimization stage in the database. In the initialization stage of executing the query plan, it is necessary to apply the method proposed in the present invention to the connection condition in the query statement:
[0053]1. Initialize the calculation cost and selection rate of each predicate. Assume that the calculation cost of A>10 is 1, and the selection rate is 40%. The calculation cost of power(B, 2)>100 is 5, and the selection rate is 20%. Power (C,3)>1000 has a computational cost of 10 and a selectivity of 10%. This is also the set o...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 

