Subject | Re: [ib-support] Order by and BLOB field |
---|---|
Author | Paul Reeves |
Post date | 2001-12-19T15:05:10Z |
szsani wrote:
ordered by blod_id, not the content of the blob.
It is arguable that order by should fail, or ignore the column if it is a
blob. After all, blobs can store any kind of data, thus rendering order by
quite meaningless for non-text blobs.
In any case, you can't index blobs, so your order by could be painfully slow
if a large result was returned. Perhaps you could store the first eighty chars
in a varchar field, index it, and order by column instead?
Paul
--
Paul Reeves
http://www.ibphoenix.com
taking InterBase further
>If you run your query in ISQL you will see what is happening - the results are
> Hi all
>
> I'd like to store texts in blob. But Order by My_Blob_field doesn't
> work well, and I can't find what is the matter.
ordered by blod_id, not the content of the blob.
It is arguable that order by should fail, or ignore the column if it is a
blob. After all, blobs can store any kind of data, thus rendering order by
quite meaningless for non-text blobs.
In any case, you can't index blobs, so your order by could be painfully slow
if a large result was returned. Perhaps you could store the first eighty chars
in a varchar field, index it, and order by column instead?
Paul
--
Paul Reeves
http://www.ibphoenix.com
taking InterBase further