![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
hello, i've just started playing around with rules and udt is it possible to alter rule? |
|
are rules 'slower' compared to check constraint? |
|
hello, i've just started playing around with rules and udt is it possible to alter rule? are rules 'slower' compared to check constraint? |
#3
| |||
| |||
|
|
hello, i've just started playing around with rules and udt is it possible to alter rule? |
|
are rules 'slower' compared to check constraint? |
#4
| |||
| |||
|
|
Nick Chan (zzzxtr... (AT) yahoo (DOT) com) writes: hello, i've just started playing around with rules and udt is it possible to alter rule? As Dan said, unbind, drop, recreate and rebind. All operations are very swift. are rules 'slower' compared to check constraint? Rules or check constraints should make any difference for implementing the business rules. However, provided that a check constraint is applied WITH CHECK and never disabled, the optimizer can trust the constraint, which can help the optimizer to find a better plan. To take a simple example, say that you have a constraint that goes CHECK (col IN ('A', 'B', 'C')) and you run the query: SELECT COUNT(*) FROM tbl WHERE col = 'D' this query will return 0 instantly, and the table will never be accessed. This can never happen with a rule, as when a rule is bound, the current data is not checked for validity. Nevertheless, binding rules and defaults to user-defined types is a very useful feature. Microsoft says in Books Online for SQL 2008, currently in beta, that the version after SQL 2008 will not have rules and bound defaults. Since there is not alternative functionality, I think this would be a serious mistake. I have filed an item for this on Connecthttps://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?Fe... Feel free to vote! -- Erland Sommarskog, SQL Server MVP, esq... (AT) sommarskog (DOT) se Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books... Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx |
#5
| |||
| |||
|
|
i wish i could use RULE to maintain employee morale (hard to get programmers here) gonna use CHECK for now |
#6
| |||
| |||
|
|
i wish i could use RULE to maintain employee morale (hard to get programmers here) gonna use CHECK for now For future reference, you might want to read up on CREATE ASSERTION which is another part of Standard SQL that might show up in the future versions of T-SQL. |
#7
| |||
| |||
|
|
ps : ur tree has been running in my server for 3 years , 150k nodes |

#8
| |||
| |||
|
|
ps : ur tree has been running in my server for 3 years , 150k nodes How is performance? Everyone asks for "Real World" examples of the Nested Sets model from someone other than me! I am not a "trusted source" ![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |