Qucik Database setup question

Posts   
 
    
Posts: 497
Joined: 08-Apr-2004
# Posted on: 20-Jul-2005 17:05:51   

I have a small database question that I'm not 100% sure about.

I have a table that stroes thousands of readings - its a very busy table and is updated and queried often. It contains a comments field, which is currently a varchar(2000). Now, our clients want more info in there (no text limit), so we can modify the table to make the column a NTEXT field instead, but I am reluctant to do this for performance worries....

If I make the change, I know that querying the table with a "select * from XXX" will be slow, because it has to bring back all the related "comments" fields and with the comments field acting as a pointer to the data it will get slow. But, if I exclude the comments field from the select fields in the query where I dont need it, will it be as fast as it was as a varchar?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39801
Joined: 17-Aug-2003
# Posted on: 20-Jul-2005 19:06:42   

Yes, it will be as fast, as SqlServer doesn't have to load the memory pages with the ntext data from disk. simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Posts: 497
Joined: 08-Apr-2004
# Posted on: 21-Jul-2005 10:06:45   

Thanks! I thought as much, but wanted to check before I made lots of code changes simple_smile