Reply to Re: MSSQL varchar vs. text

Your name:

Reply:


Posted by Kimmo Laine on 12/07/05 12:40

"Steve" <googlespam@nastysoft.com> wrote in message
news:1133947419.069827.74850@z14g2000cwz.googlegroups.com...
>
>> What's the essential difference between the two field types varchar and
>> text.
>
> I guess this refers to this <mssql_field_length> and the user notes by
> "marc at NOSPAM dot durdin dot net" here: <http://uk.php.net/mssql>.
> The workaround mentioned is:
>
> -- for example, with MyVarCharField VARCHAR(1000)
> SELECT CAST(MyVarCharField AS TEXT) FROM MyTable

Yep, as I said, it gets ugly. I'd like to keep my queries as close to
"SELECT * FROM table" as I can. If I have to write each long varchar field
separately using CAST, then I'm just gonna use the text datatype.

> There will definitely be a performance hit when using TEXT instead of
> CHAR or VARCHAR. You'll have to make some tests to see if you could
> live with that.

That's what I was afraid of. I guess I just have to do like you said and do
some performance tests and see how it affects.

Thanks for replying, both you and NC

--
"En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviφ
antaatulla.sikanautaa@gmail.com.NOSPAM.invalid

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация