Please enable JavaScript.
Coggle requires JavaScript to display documents.
Tuning - Coggle Diagram
Tuning
-
-
-
Tuning Queries
-
Typical instances:
A. In some situations involving using of correlated queries, temporaries are useful.
B. If multiple options for join condition are possible,
choose one that uses a clustering index
and avoid those that contain string comparisons.
-
D. Some query optimizers perform worse on nested queries compared to their equivalent un-nested counterparts.
E. Many applications are based on views that define the data of interest to those applications. Sometimes these views become an overkill.
Guidelines:
A query with multiple selection conditions that are connected via OR may not be prompting the query optimizer to use any index. Such a query may be split up and expressed as a union of queries, each with a condition on an attribute that causes an index to be used.
-
Apply transformations
- NOT condition may be transformed into a positive expression.
- Embedded SELECT blocks may be replaced by joins.
- If an equality join is set up between two tables, the range predicate on the joining attribute set up in one table may be repeated for the other table
-
Tuning Indexes
Reasons:
-
-
Certain indexes may be causing excessive overhead
because the index is on an attribute that undergoes frequent changes
-
Tuning Databases
How:
Dynamically changed processing requirements need to be addressed,,
by making changes to the conceptual schema if necessary,,
-
Possible changes:
A. Existing tables may be joined (denormalized)
because certain attributes from two or more tables are frequently needed together
B. For the given set of tables, there may be alternative design choices,
all of which achieve 3NF or BCNF. One may be replaced by the other
C. A relation of the form R(K, A, B, C, D, …) that is in BCNF
can be stored into multiple tables that are also in BCNF
by replicating the key K in each table.
D. Attribute(s) from one table may be repeated in another
even though this creates redundancy and potential anomalies
-