Home All Groups Group Topic Archive Search About

Should I move the ntext field to another table

Author
22 Jul 2005 11:30 AM
Craig HB
I have an Orders table that includes an ntext field called "Notes". I am
considering moving that field into another table called OrderNotes that has a
1-to-1 relationship with the Order table.

The reason for this is that I am hoping that this could speed up querying
the Orders table, since not all queries will need the Notes field. Also, the
notes field could be NULL for most orders. But then you would get an extra
join for some queries.

Can anyone give me an idea of whether this is a good idea ?

Thanks,
Craig

Author
22 Jul 2005 11:40 AM
ML
Both thumbs up!


ML
Author
22 Jul 2005 12:42 PM
Andrew J. Kelly
IF you don't need the notes column then don't include it in your list of
columns for your query.  Moving it to another table will do nothing if you
are always joining it and including the column in the select list. Never
include columns if you don't need them. Chance are the ntext column is not
the source of the slow queries.  I would look at the query plan first to see
what the issues are.

--
Andrew J. Kelly  SQL MVP


Show quote
"Craig HB" <Crai***@discussions.microsoft.com> wrote in message
news:0C2E337A-AAB3-42E5-A49C-9727EC1B17FD@microsoft.com...
>I have an Orders table that includes an ntext field called "Notes". I am
> considering moving that field into another table called OrderNotes that
> has a
> 1-to-1 relationship with the Order table.
>
> The reason for this is that I am hoping that this could speed up querying
> the Orders table, since not all queries will need the Notes field. Also,
> the
> notes field could be NULL for most orders. But then you would get an extra
> join for some queries.
>
> Can anyone give me an idea of whether this is a good idea ?
>
> Thanks,
> Craig
Author
22 Jul 2005 3:26 PM
Jeremy Williams
Unless you used the "text in row" option on the table containing the ntext
column, the data is already stored spearately from the rest of the row
information, so separating the information out is unlikely to help here.

For more information, see "Managing ntext, text, and image Data" in the BOL
documentation.

Show quote
"Craig HB" <Crai***@discussions.microsoft.com> wrote in message
news:0C2E337A-AAB3-42E5-A49C-9727EC1B17FD@microsoft.com...
> I have an Orders table that includes an ntext field called "Notes". I am
> considering moving that field into another table called OrderNotes that
has a
> 1-to-1 relationship with the Order table.
>
> The reason for this is that I am hoping that this could speed up querying
> the Orders table, since not all queries will need the Notes field. Also,
the
> notes field could be NULL for most orders. But then you would get an extra
> join for some queries.
>
> Can anyone give me an idea of whether this is a good idea ?
>
> Thanks,
> Craig

AddThis Social Bookmark Button