Re: Informix limitations, should we be using Oracle?

From: Zombie Elvis <zelvis_at_tw_at_.internet.cafe>
Date: Fri, 18 Oct 2002 11:56:02 +1000
Message-ID: <3daf6b1f_1_at_news.iprimus.com.au>


"Tim Schaefer" <tim_at_datad.com> wrote...
> I was under the impression that CHAR data types were a
> fixed allocation of space and varchars were variabl-
> spaced, thus the naming of them.
>

Yes, but they also behave a little bit differently. The most obvious one is that since chars are fixed-width, they pretend that the trailing blanks don't exist (i'd wager that most engines are like that) but since varchars look after their own length, they can store blanks at the end - which is very unpleasant in my personal opinion for database work since users can't "see" trailing blanks and will wonder why their query doesn't work, especially when typing in a code from a printed report...

> As to the trailing blanks statement, I would be very
> quick to ask someone from an Informix or Oracle technical
> background if indeed trailing blanks are "optimized" in
> the database for plain CHAR. On several versions of older
> Informix this was not the case as I recall but again my
> memory is foggy on this.
>

I'm speaking more in terms of what the (Informix) engine can do with the columns. Insofar as the CHAR or VARCHAR types are stored in memory, I wouldn't put a slice of lemon between them for performance, considering the likelyhood that disk access times will truly swamp any CPU cycles that might be saved one way or the other. The real "optimisation" difference (Informix) is that some actions by the engine cannot be performed if a table contains VARCHARs. I've made a page which describes the differences in detail. Jack Parker made some significant contribution regarding the way the engine executes some queries. Received on Fri Oct 18 2002 - 03:56:02 CEST

Original text of this message