answersLogoWhite

0

Our technologist uses constraints to improve query performance. It is interesting to note how important constraints are for query optimization. Many people think of constraints as a data integrity thing, and it's true-they are. But constraints are used by the optimizer as well when determining the optimal plan. The optimizer takes as inputs * The query to optimize * All available database object statistics * System statistics, if available (CPU speed, single-block I/O speed, and so on-metrics about the physical hardware) * Initialization parameters * Constraints And the optimizer uses them all to determine the best approach. Something I've noticed over time is that people tend to skip constraints in a data warehouse/reporting system. The argument is, "The data is good; we did a data cleansing; we don't need data integrity constraints." They might not need constraints for data integrity (and they might be unpleasantly surprised if they did enable them), but they do need integrity constraints in order to achieve the best plans. In a data warehouse, a bad query plan might be one that takes hours or days to execute-not just a couple of extra seconds or minutes. It is a data warehouse, therefore, that truly needs constraints-for performance reasons. Let's look at some examples (these were all executed in Oracle Database Cuties8

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Explain the distinction between total and partial constraints?

Total constraints are those in which a table's existence requires the existence of an associated table in a particular defined relation between them. whereas Partial constraints are involved with the tables in which presence of one table is partial for the associated table.


What is constraints in database management system?

Constraints are sort of restrictions, which restrict the data that can be stored in a relation (Table). or Constraints are mostly a collection of indexes and triggers that restrict certain actions on a table. There are four types of constraints: Primary Key ConstraintsUnique ConstraintsCheck ConstraintsForeign Key (FK) Constraints. - chandrabhan


What is the use of cantraints?

Constraints are used to enforce rules and limitations on the data that can be stored in a database table. They help ensure data integrity by preventing invalid or inconsistent data from being added to the database. Common types of constraints include primary key, foreign key, unique, and check constraints.


What are database constraints?

Constraints put conditions at table level. There are 5 database constraints: 1. unique 2. not null 3. primary key 4. foreign key 5. check


What is the periodic table of elements used for?

The "Periodic Table of Elements" is used for classifying the elements, and to know which one is which.


What do I need to know before purchasing a used pool table?

It's good to know how you plan on using the table. The three major things to look for are the level of the table, the underlay of the table, and the challenge of the table.


What are artificial variable used in operational research?

Artificial Variables are used to get an initial basic variable from the constraints while preparing the initial basic feasible solution table. Constraints of >= type and = type don't provide any basic variable. So, artificial variable is added arbitrarily to get the basic variable


What is key constraints?

Primary Key is a Constraint Used to avoid Duplicate entries in database table and you define primary key the column doesn't allow NULL values.


How do you create a table using another table including constraints?

If your using Ms SQL, use enterprise manager to export all scripts for a particular table in one file


What are the Lagrangian constraints used for in optimization problems?

Lagrangian constraints are used in optimization problems to incorporate constraints into the objective function, allowing for the optimization of a function subject to certain conditions.


What is logical view of database?

The logical constists of the name of the table, the attributes it contains, their types, the constraints on the attributes, if any.


How do you disable constraints in dbms?

To disable constraints in a DBMS, you typically use specific SQL commands tailored to the database system in use. For example, in Oracle, you can use the command ALTER TABLE table_name DISABLE CONSTRAINT constraint_name;. In SQL Server, you would use ALTER TABLE table_name NOCHECK CONSTRAINT constraint_name;. Always remember to re-enable the constraints after your operations to maintain data integrity.