sql server best practices in indian style by rajat jaiswal
Post on 18-Jul-2015
144 Views
Preview:
TRANSCRIPT
Indiandotnet –
Microsoft user
group
community
Rajat Jaiswal
http://indiandotnet.wordpress.com
HTTPS://facebook.com/indiandotnet
Bada hai To better Hai
Indian mentality but do not apply in database designing (Best Practices in Designing )
Column Name Data Type (current Data type) Length Data Type(after change) Length
EnrollmentHistoryId numeric 9 numeric 9
EnrollmentId numeric 9 numeric 9
ClassId numeric 9 tinyint 1
WorkSheetId numeric 9 int 4
classTeacherId numeric 9 int 4
ClassRoomId numeric 9 tinyint 1
centerId numeric 9 tinyint 1
HomeAddressId nchar 20 int 4
FriendsId numeric 9 int 4
Comments varchar 300 varchar 300
Notes varchar 300 varchar 0
CreatedBy numeric 9 int 4
CreatedDate datetime 8 small datetime 4
ModifiedBy numeric 9 int 4
ParentId numeric 9 numeric 9
ModifiedDate datetime 8 datetime 8
StatusId numeric 9 tinyint 1
SynchStatusId numeric 9 tinyint 1
Rows 753 368
No of rows in curernt database 5000000
bytes 3765000000 1840000000
KB 3676757.81 1796875
MB 3590.5838 1754.76074
GB 3.506429 1.71363354
space diffrence (GB) (aprox) 1.79279596
* above result is by just sum of max length ofvariable & non variable columns
Are Ye bhi Yaad
rakho NULL hi to
Hai
It is not only about NULL but all the constraints
- thik hai / chalta hai - Indian attitude
I LOVE “ Not IN”
MUZE TO SIRF NOT IN CLAUSE EASY LAGTA HAI - TRY JOIN AND OTHER FEATURES ALSO .
ALTHOUGH IT NOT ALWAYS BAD
SAB AANE DO
kaha paise lag
rahe hai
Free me sab chalega
BAAD ME DEKH LENGE ATTITUDE
NO FILTER CLAUSE
FUNCTION HI
FUNCTION
Function is good to have but if we not use it properly it will slow down system
top related