摘要:
In an embodiment, a plurality of estimates of costs of executing a plurality of respective queries is received from a plurality of respective virtual machines using a plurality of respective estimated resources allocated to the plurality of respective virtual machines. A selected virtual machine of the plurality of respective virtual machines is selected with a lowest weighted cost ratio, as compared to all other of the plurality of respective virtual machines. A source virtual machine is found with a lowest current resource usage. An amount of a resource to deallocate from the source virtual machine is calculated, which further comprises estimating the amount of the resource to deallocate that does not raise the lowest current resource usage over a maximum resource threshold. The amount of the resource from the source virtual machine is deallocated. The amount of the resource is allocated to the selected virtual machine.
摘要:
In an embodiment, a threshold value is calculated for a current entry in a first column of an index. If the current entry has been read a number of times by execution of an execution plan that is more than the threshold value and the current entry points to at least one row in a table and not all of the at least one row have been selected by the execution plan for inclusion in a result set as satisfying a query that the execution plan implements, then a new entry is added to the index.
摘要:
A partially built index is used in a computer database system. When a database index is being built, or rebuilt, the database manager keeps track of the records processed using a relative row number (RRN) to track what part of the partially built index is complete. Queries are optimized by a query optimizer associated with the database manager that uses the portion of the index that is complete with reference to the RRN. The remainder of the database table beyond the RRN can be estimated or implemented using the completed data or can be determined by searching the relevant portion of the database table.
摘要:
Techniques are disclosed for reorganizing rows of a database table. In one embodiment, each row is associated with a respective row identifier. A mapping is provided that assigns a logical identifier to each row identifier. Each database index on the database table is configured to use the logical identifier rather than the row identifier. Accordingly, the rows of the database table may be reorganized without having to modify any database index on the database table.
摘要:
A method, apparatus and program product that determine a density for each key value of a plurality of key values in a table over at least one range of rows in the database table, and store the determined densities in a data structure for use in optimizing a query that references a key value in the plurality of key values in the table. By doing so, the density of various key values may be determined and dynamically maintained, often resulting in optimization data for improved query optimization.
摘要:
A method, apparatus, and program product is provided to, in response to receiving a first database query for which usage of shared weight indices is prohibited, determine whether a shared weight index associated with a column of a database table referenced by the first database query can be utilized as a non-shared weight index to optimize the database query. The method, apparatus, and program product determine whether the column includes at least one changed weight value and determines whether the database query references at least one changed weight value in the column. The shared weight index is utilized to optimize the first database query in response to determining that the shared weight index can be utilized as a non-shared weight index to optimize the first database query.
摘要:
A method, apparatus and program product that determine a density of a key value referenced in a database query over at least one range of rows, and utilize the determined density to optimize the database query. By doing so, the density of various key values may be determined and compared, and a bit map may be generated over the range of rows of the key value that is denser, resulting in a reduction of resources to build and use the bit map. Moreover, from the bit map over the range of rows to be selected after using the determined density, dense regions may be identified that can be used to optimize block I/O's according to the number of rows to be selected based on the query.