PostgreSQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesPostgreSQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 15th, 2003, 01:35 PM
avrfreak avrfreak is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 5 avrfreak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Stupid performance question

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

Reply With Quote
  #2  
Old December 15th, 2003, 01:57 PM
bcyde's Avatar
bcyde bcyde is offline
Me likey breadsticks...
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jan 2003
Location: Los Angeles
Posts: 1,189 bcyde User rank is Sergeant (500 - 2000 Reputation Level)bcyde User rank is Sergeant (500 - 2000 Reputation Level)bcyde User rank is Sergeant (500 - 2000 Reputation Level)bcyde User rank is Sergeant (500 - 2000 Reputation Level)bcyde User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 3 Days 1 h 12 m 58 sec
Reputation Power: 12
Send a message via AIM to bcyde Send a message via Yahoo to bcyde
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...

Reply With Quote
  #3  
Old December 15th, 2003, 02:40 PM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 13
Send a message via AIM to rod k
The only reason to use varchar over text (in Postgres anyway) is if you want to limit the max size. Otherwise they perform identically.

Reply With Quote
  #4  
Old December 16th, 2003, 03:44 AM
avrfreak avrfreak is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 5 avrfreak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thought so.

Thanks, guys!

AF

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesPostgreSQL Help > Stupid performance question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT