Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Beware! Esoteric Considerations & Other Localized Phenomena
Message
De
18/04/2006 11:00:51
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Beware! Esoteric Considerations & Other Localized Phenomena
Divers
Thread ID:
01114283
Message ID:
01114283
Vues:
68
Some things that I rarely conciously think about in daily work, but that can be insanely difficult to fix down the road:

1. Always set the environment for every object that you create:
     SET ARITHABORT ON
     SET ANSI_PADDING ON
     SET ANSI NULLS ON
     SET ANSI_WARNINGS ON
     SET CONCAT_NULL_YIELDS_NULL ON
     SET NUMERIC_ROUNDABORT OFF
     SET QUOTED_IDENTIFIER ON
2. Avoid outer joins unless absolutely necessary.
3. Avoid NULLable columns whenever possible.
4. Use ISNULL() all the time.
5. Use CASE WHEN myCol IS NULL THEN x ELSE y END all the time.
6. Never create NULLable keys.
7. Always create a human-readable 'Candidate Key' column along with the PK.
8. Work only from scripts (or regenerate the scripts after each change).
9. Examine the execution plans of all queries containing one or more joins.
10. Use SSMS and save scripts in a solution all the time.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform