dbTalk Databases Forums  

[Info-ingres] varchar as keys

comp.databases.ingres comp.databases.ingres


Discuss [Info-ingres] varchar as keys in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Grant Wolcott
 
Posts: n/a

Default [Info-ingres] varchar as keys - 03-18-2005 , 09:57 AM






Hey all,

I've heard through the grapevine that a varchar is not an appropriate
data type for a column that is a key column, or one that is heavily joined
on. Can anyone out there give me a definitive answer as to whether or not
there any performance issue(s) to be concerned with here?

thanks for your help!
Grant


Reply With Quote
  #2  
Old   
Roy Hann
 
Posts: n/a

Default Re: [Info-ingres] varchar as keys - 03-18-2005 , 10:17 AM






"Grant Wolcott" <wolcott (AT) fstrf (DOT) org> wrote

Quote:
Hey all,

I've heard through the grapevine that a varchar is not an appropriate
data type for a column that is a key column, or one that is heavily joined
on. Can anyone out there give me a definitive answer as to whether or not
there any performance issue(s) to be concerned with here?
That is pretty close to being a superstition. However there are internal
limits to the size of a key attribute, and it is easy enough to define a
varchar that exceeds it (400 bytes). Large keys can--in principle-slightly
impair performance, but I have yet to see a real system where there weren't
also a host of other WAY worse problems that completely swamp any small
performance penalty that large keys incur.

Varchars as keys were historically more of a problem than they are today.
It rather depends on how big you intend the attribute to be. Luckly, in
nature, one rarely sees truly enormous keys. (Directory paths are one
notorious exception that springs to mind though.)

Varchars per se are perfectly OK as key attributes--as they necessarily must
be if Ingres wants to be called an RDBMS.

Roy Hann (rhann at rationalcommerce dot com)
Rational Commerce Ltd.
www.rationalcommerce.com
"Ingres development, tuning, and training experts"




Reply With Quote
  #3  
Old   
Michael Leo
 
Posts: n/a

Default Re: [Info-ingres] varchar as keys - 03-18-2005 , 10:53 AM



At 4:17 PM +0000 3/18/05, Roy Hann wrote:
Quote:
"Grant Wolcott" <wolcott (AT) fstrf (DOT) org> wrote in message
news:mailman.1111161482.26687.info-ingres (AT) cariboulake (DOT) com...
Hey all,

[good stuff snipped]

Varchars per se are perfectly OK as key attributes--as they necessarily must
be if Ingres wants to be called an RDBMS.

Roy Hann (rhann at rationalcommerce dot com)
Rational Commerce Ltd.
www.rationalcommerce.com
"Ingres development, tuning, and training experts"
Oh boy. It's Friday and Roy is starting to talk about what it
takes to be called an RDBMS. MySQL lovers beware ...

;-)

--
Michael Leo Java, J2EE, BEA WebLogic,
Caribou Lake LLC Oracle, Open Source, Ingres,
mleo (AT) cariboulake (DOT) com Real Enterprise Applications

Climate is what we expect. Weather is what we get.
- Mark Twain


Reply With Quote
  #4  
Old   
Grant Wolcott
 
Posts: n/a

Default Re: [Info-ingres] varchar as keys - 03-18-2005 , 10:57 AM



Thanks lots, Roy - this gives me more confidence to barrel ahead... We
want to change some of the columns of our in-house dictionary tables from
char(8) to varchar(32). Obviously, these tables are heavily used and often
joined w/other tables - so you can see our concerns.

thanks again,
Grant


At 04:17 PM 3/18/2005 +0000, Roy Hann wrote:
Quote:
"Grant Wolcott" <wolcott (AT) fstrf (DOT) org> wrote in message
news:mailman.1111161482.26687.info-ingres (AT) cariboulake (DOT) com...
Hey all,

I've heard through the grapevine that a varchar is not an appropriate
data type for a column that is a key column, or one that is heavily joined
on. Can anyone out there give me a definitive answer as to whether or not
there any performance issue(s) to be concerned with here?

That is pretty close to being a superstition. However there are internal
limits to the size of a key attribute, and it is easy enough to define a
varchar that exceeds it (400 bytes). Large keys can--in principle-slightly
impair performance, but I have yet to see a real system where there weren't
also a host of other WAY worse problems that completely swamp any small
performance penalty that large keys incur.

Varchars as keys were historically more of a problem than they are today.
It rather depends on how big you intend the attribute to be. Luckly, in
nature, one rarely sees truly enormous keys. (Directory paths are one
notorious exception that springs to mind though.)

Varchars per se are perfectly OK as key attributes--as they necessarily must
be if Ingres wants to be called an RDBMS.

Roy Hann (rhann at rationalcommerce dot com)
Rational Commerce Ltd.
www.rationalcommerce.com
"Ingres development, tuning, and training experts"


_______________________________________________
Info-ingres mailing list
Info-ingres (AT) cariboulake (DOT) com
http://mailman.cariboulake.com/mailm...py/info-ingres


Reply With Quote
  #5  
Old   
Roy Hann
 
Posts: n/a

Default Re: [Info-ingres] varchar as keys - 03-18-2005 , 11:13 AM



"Grant Wolcott" <wolcott (AT) fstrf (DOT) org> wrote

Quote:
Thanks lots, Roy - this gives me more confidence to barrel ahead... We
want to change some of the columns of our in-house dictionary tables from
char(8) to varchar(32).
That'll be fine. (And besides, what's the alternative?)

Roy




Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.