Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Can blob be compared?

Re: Can blob be compared?

From: Simon Hall <Simon.Hall_at_logicacmg.com>
Date: Mon, 07 Apr 2003 10:14:56 +0100
Message-ID: <3E914190.A7157298@logicacmg.com>

Mark D Powell wrote:
>
> "NewYorker" <newyorker777_at_hotmail.com> wrote in message news:<3e8e4e7f$1_4_at_corp-goliath.newsgroups.com>...
> > I have used Sql here and there and never in the situation where by join
> > comparison of a blob, can blob be compared? Example,
> >
> > select table_a.* from table_a a, table_b b
> > where a.someblob = b.someblob;
> >
> > someblob is a blob column.
> >
> > Thanks!!!!!
> >
>
> My first thought when I read your post was "Man, if that is possible
> the query is going to be slower than Christmas."
>
> The dbms_lob package provides a compare procedure that can compare
> full lobs so you should be able to reference it in the where clause
> testing the return value = 0 for equal and non-zero for unequal.
>
> HTH -- Mark D Powell --

Just a thought - when you create (or change) the blob create a checksum. Then when you want to compare blobs, compare the length and the checksum instead. Only if both match do you then need to compare the blobs byte for byte.

HTH Simon Received on Mon Apr 07 2003 - 04:14:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US