Mel,
> i wanted to find out for sure if i really won't get the desired result(s)
> in sql and have to create a function instead.
Perhaps, but the function better be in C, or your performance will continue to
suck ...
> yes it breaks the 1st normal form. we did this for some *practical*
> purposes supposedly. =) i would've wanted to discuss it here but i'll
> probably bore you to death or i'd end up starting a new discussion
> altogether. since it's in production and i need to do a quick patch
> without touching the external programs depending on this schema, i've to
> find a quick remedy.
To be frank, boyo, you're on the road to hell.
I am constantly amazed at how many newbie DBAs adopt not-normalized schema
because "it's faster" and then have to add in workarounds that kill the
performance of their database.
Anyway, if someone else doesn't solve it, I'll come up with a SQL solution
later in the week ....
--
Josh Berkus
Aglio Database Solutions
San Francisco