Re: Varchar vs. Text
From: Louis Davidson (dr_dontspamme_sql_at_hotmail.com)
Date: 02/04/05
- Next message: David Gugick: "Re: Frequency distribution SQL statement"
- Previous message: Andy Wakeling: ""On Error Resume Next" in SQL Server"
- In reply to: MG: "Re: Varchar vs. Text"
- Next in thread: Robbe Morris: "Re: Varchar vs. Text"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 4 Feb 2005 10:06:59 -0600
I think I might go that way to start. If you are always going to be
fetching the data, you are going to be paying the cost no matter what.
Obviously it might not be ideal, so I would do a good deal of performance
testing, but you should do that anyhow :)
-- ---------------------------------------------------------------------------- Louis Davidson - drsql@hotmail.com SQL Server MVP Compass Technology Management - www.compass.net Pro SQL Server 2000 Database Design - http://www.apress.com/book/bookDisplay.html?bID=266 Blog - http://spaces.msn.com/members/drsql/ Note: Please reply to the newsgroups only unless you are interested in consulting services. All other replies may be ignored :) "MG" <y4forums.t.mdgoyal@xoxy.net> wrote in message news:uQ6AEaqCFHA.3596@TK2MSFTNGP12.phx.gbl... > The average comment would be around 250 - 500 bytes long. Comments will be > added for only 10% of all the rows, but the field will be updated or > called > everyone the stored procedure executes. > I want to go with varchar because I would like to put a clustered index on > the table, and because of the design limitations, the clustered index also > gets updated with every update call and SQL won't perform the clustered > index update along with the text column update. > > > "Louis Davidson" <dr_dontspamme_sql@hotmail.com> wrote in message > news:ub$tgTmCFHA.1084@tk2msftngp13.phx.gbl... >> Depends. How long will the average/typical comment be? Why 7000? Is > this >> just an arbitrary amount, or do you have requirements to go this long? >> Also, will you need the comments every time you use the row? And will >> you >> need history of the comments? >> >> If you just want to give them extra space, and the average will be quite >> short (which is a typical situation) then you might be fine. Otherwise, >> I >> might do something like: >> >> table >> ====== >> tableKey >> --------- >> other columns >> >> tableComments >> =========== >> tableKey (fk to table.tableKey) >> username >> commentDate >> -------------------- >> Comments >> >> All in all it depends on the requirements. >> >> -- >> -------------------------------------------------------------------------- > -- >> Louis Davidson - drsql@hotmail.com >> SQL Server MVP >> >> Compass Technology Management - www.compass.net >> Pro SQL Server 2000 Database Design - >> http://www.apress.com/book/bookDisplay.html?bID=266 >> Note: Please reply to the newsgroups only unless you are interested in >> consulting services. All other replies may be ignored :) >> >> "MG" <y4forums.t.mdgoyal@xoxy.net> wrote in message >> news:ORfP$5iCFHA.2568@TK2MSFTNGP10.phx.gbl... >> > I'm in the process of designing a new table with a comment column that >> > could >> > be either varchar(7000) or text. I wanted to get an idea of positives >> > or >> > negatives of going with the varchar(7000). The other columns in the > table >> > add upto 200 bytes so the row size would not exceed 8K in size. >> > >> > Thanks, >> > >> > Mike >> > >> > >> >> > >
- Next message: David Gugick: "Re: Frequency distribution SQL statement"
- Previous message: Andy Wakeling: ""On Error Resume Next" in SQL Server"
- In reply to: MG: "Re: Varchar vs. Text"
- Next in thread: Robbe Morris: "Re: Varchar vs. Text"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|