MySQL user's Conference

Bradley Baetz bbaetz at
Sat Apr 26 12:38:47 UTC 2003

On Sat, Apr 26, 2003 at 11:39:35AM +0100, Gervase Markham wrote:
> >*cough* votes/keywords cache *cough*. Which, btw, is where a function to
> >get the sorted list of keywords from a bug_id (for display) would be
> >very useful. We can't use a join because that won't sort it, so we could
> >just SELECT bug_id, get_keyword_string(bug_id), .... where
> >get_keyword_string just concatentates SELECT name FROM keywords WHERE
> >bug_id=aBugId ORDER BY UPPER(name), or something along those lines.
> Shouldn't the display templates be responsible for sorting them anyway? 
> So we can use a JOIN?

But then you get an extra set of rows on teh other side of the join,
which you don't need. Besides, its quicker to have the db sort it for
you, since it can use indexes.

> Gerv


More information about the developers mailing list