-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: String length guidance please
PostPosted: Tue Jul 19, 2005 8:53 pm 
Newbie

Joined: Mon Mar 28, 2005 4:26 pm
Posts: 3
Location: Thydney, Australia
Hello,
Using Hibernate3 & Postgresql8 on Win32. I'm much more of a Java developer than SQL user, so any heuristic guidance is welcome. I notice the default string length in my database is 256 - not 200, 250, 257, 300 etc - but on a "standard binary boundary" of 256. Abviously I'll optimise my string lengths as necessary - but is it preferrable to maintain a "standard binary boundary"??? Lets say I want length 10 - should I just round up to 16? Should 50 go to 64, 100 to 128??? Is there a potential big advantage if I could bring a "130 down to 128"??? Or is all this quite marginal and I should concentrate my efforts elsewhere??

I realise this may be very implementation dependent - but any guidance is appreciated.
Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 20, 2005 1:31 am 
Senior
Senior

Joined: Thu May 12, 2005 11:40 pm
Posts: 125
Location: Canada
It may be worthwhile to ensure the size of a whole row is a multiple of the underlying architecture's cache-line size, 64b on most modern x86 CPUs. Aside from that, I doubt there is going to be any measurable difference in any usage scenario. I still try to keep my string lengths to powers of 2, for 'conceptual elegance' :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.