Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Improving sql speed
U Radia wrote:
>
> I audit changes in columns with XML. Any changes are approved but I
> need to find how many changes are not.
>
> This query is slow. Can I speed it?
>
> select count(*) from debtors3Y where like
> '<audit><x1><a9004><authorID%' and not like
> '<audit><x1><a9004><authorID%<approved%';
>
> Upul
The easiest way to speed it up would be to store the XML relationally and then reconstitute it on demand if required.
Doing so will also save a lot of disk space.
BTW: What version of Oracle?
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Sat Feb 26 2005 - 09:58:32 CST