I have two tables (UserTable and UserProfile) and the Structure:
create table userTable( id_user int identity(1,1) primary key , Name varchar(300) not null , Email varchar(500) not null , PasswordUser varchar(700) not null, userType int , constraint usertype_fk foreign key(userType) REFERENCES userType(id_type) on delete set null )
and userPtrofile:
create table UserProfile(
id_profile int identity(1,1) primary key ,
ClientCmpName varchar(300) null,
Clientaddress varchar(500) null,
phone varchar(50) null,
descriptionClient varchar(400) null,
img image null,
messageClient text ,
fk_user int ,
constraint fkuser foreign key(fk_user) references userTable(id_user)
on delete cascade
)
I am using SQL Server 2008. The problem is that when I update records the executing load without executing this is sample query:
update UserProfile set messageClient=N'010383772' where fk_user=2;
screenshot

textfield which isn't stored inline with the rest of the row data and is an extra hop per record to update. However the documentation on this (technet.microsoft.com/en-us/library/…) says that as long as the data is small, it shouldn't have to do that extra hop. I don't know if this optimization was done for 2008 though. - DiskJunky