|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi all,
I am just wondering: - When considering performance of a database; what matters will be the complexity of each query and the amount of related entities when doing joins, right? And wether the actual entity is a VARCHAR or a TEXT class element does not mean anything for the performance of the query? I am only asking because some guy told me he had to change the data type for the textbody field of an email database (like for a forum application) from TEXT to VARCHAR because of the complex joins he was making. Does this all make sense? I mean; when all fields are indexed, what will the data type matter? Hope somebody can be interested in DevShedding some light on this issue for a humble mortal! Best regards; avrfreak ![]() |
|
#2
|
||||
|
||||
|
It may be database dependent. IIRC, mysql does (used to?) have varying performance with text and varchar types. Postgres does not. Things may have changed, but this newsgroup posting reflects this:
http://groups.google.com/groups?q=m...sinki.fi&rnum=2 HTH, -b
__________________
PostgreSQL, it's what's for dinner... |
|
#3
|
|||
|
|||
|
The only reason to use varchar over text (in Postgres anyway) is if you want to limit the max size. Otherwise they perform identically.
|
|
#4
|
|||
|
|||
|
Thought so.
Thanks, guys! AF |
![]() |
| Viewing: Dev Shed Forums > Databases > PostgreSQL Help > Stupid performance question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|