Subject | Re: [ib-support] ORDER BY on BLOB |
---|---|
Author | Kenneth Foo |
Post date | 2002-03-31T06:55:52Z |
That worked!
I have a few BLOB columns. I couldn't use VARCHAR, since I'm not sure how
long
the text can go. But most of the time, they're all rather short.
Thanks.
Regards
Kenneth
I have a few BLOB columns. I couldn't use VARCHAR, since I'm not sure how
long
the text can go. But most of the time, they're all rather short.
Thanks.
Regards
Kenneth
----- Original Message -----
From: "Claudio Valderrama C." <cvalde@...>
Newsgroups: egroups.ib-support
To: <ib-support@yahoogroups.com>
Sent: Sunday, March 31, 2002 1:29 PM
Subject: Re: [ib-support] ORDER BY on BLOB
> ""Kenneth Foo"" <kenneth@...> wrote in message
> news:005c01c1d873$6fd233d0$5800a8c0@mtec...
> > Hi
> >
> > Is sorting by contents of text blobs possible on IB/FB?
> > I tried something like this
> >
> > select * from messages order by msg_from;
> >
> > where msg_from is a blob field subtype 1. (Text).
> > What I got was totally off.
> > Is IB/FB sorting against BLOB ID instead?
>
> Yes, although maybe it simply should complain.
> FB may do even odder sort due to code I was doing, but the documentation
> states you can't (you shouldn't).
>
>
> > If yes, how then do I sort by BLOB contents?
>
> Due to the variable size of blobs, it's not possible nor desirable. It
would
> be a huge performance drain and jack of kludges, since a simple blob can
> span 2GB. The internal temporary sort file would be gruesome. The same
> reason blobs aren't indexed. If your blobs are reasonable short, try this:
>
> select substring(msg_from from 1 for 1000)
> from messages
> order by 1;
>
> C.
> --
> Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
> Independent developer
> Owner of the Interbase® WebRing
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>