Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Improving sql speed
On 26 Feb 2005, upulbhradia_at_yahoo.com 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%';
What you are currently attempting has nothing to do with XML and all about speeding up "like" queries. To take advantage of XML you can submit an XMLSchema to Oracle and then Oracle will shred your XML into a performant structure which you apply XML queries against, and I'm talking about Oracle XML support.
ie, if you are going to go XML route in the database, then use the XML support offered by the database.
-- Galen deForest BoyerReceived on Sun Feb 27 2005 - 17:37:05 CST