At 11:49 PM -0700 9/29/05, colin.hay (AT) fintechnix (DOT) com wrote:
Quote:
We have tables in our schema with columns of type VARCHAR, CHAR, TEXT
and C
If a join occurs between a column of type TEXT and a column of type
VARCHAR (or C and CHAR) does this mean casting occurs and indices may
not be employed because of this ? |
I'm never quite sure when this happens. I think you'll find that C joining
to anything non-C will not use an index, because of the peculiar blank-
ignoring semantics of C. TEXT and VARCHAR also have slightly different
semantics dealing with trailing blanks, but I'm not sure if it suppresses
index usage.
Quote:
I am trying to push for the need to convert all our TEXT columns to
VARCHAR and all our C columns to CHAR to potentially improve
performance. Is this worthwile ? |
You definitely want to get rid of the C's unless you are depending on
their weird comparison semantics. TEXT I'm not so sure of, but if
you're going to go to the effort of changing C you might as well change
both.
Karl