Subject | Re: ORDER BY on large VARCHAR columns |
---|---|
Author | robert_difalco |
Post date | 2004-10-19T21:31:41Z |
> have you tried adding another field of say 128 characters (I don'tknow your
> collation), on insert/update put the leading substring in thisfield and
> have this field indexed so you use it to return the order you want?Problem is that the string would be too short to be valuable in an
> Alan
ORDER BY. Consider that this field is something like a qualified
file system path. The front part could be repeated in many of the
rows but you need both the front and the back (and even the middle)
for ordering them accurately. I think the best approach is to
calculate the order as they are inserted, just would be nice to have
an example of how best to do that.
R.