Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to fasten the XML searching compared to database

Status
Not open for further replies.

sajum

Programmer
Feb 13, 2003
2
IN
Hi,

i'm putting the whole scenario here:
It will be so helpful if u can help me.

-------------------the doubt----------------------------


i'm having an xml in the following format

<LOV>
<RECORD NO=&quot;1&quot;>
<FIELD NAME=&quot;EMPNO&quot;>E1001</EMPNO>
<FIELD NAME=&quot;EMPNAME&quot;>MR. X</EMPNO>
<FIELD NAME=&quot;TEAM&quot;>PRODUCT TEAM</EMPNO>
</RECORD>
<RECORD NO=&quot;2&quot;>
<FIELD NAME=&quot;EMPNO&quot;>E1002</EMPNO>
<FIELD NAME=&quot;EMPNAME&quot;>MR. Y</EMPNO>
<FIELD NAME=&quot;TEAM&quot;>TECHNOLOGY TEAM</EMPNO>
</RECORD>
</LOV>

like this there will be minimum 5000 records and what i need is to search this xml(using DOM) by specifying a condition like

EMPNO=E1001
or EMPNAME=MR.X or EMPNO=E1* etc etc.

i did this with the help of NodeIterator.

but the problem is :

this is done to avoid database interaction.
and this s taking 2-3 secs to query and once it is stored as an object it s taking .3 secs.

but when i tried to query the same no and sort of records straight from a database it s taking only .1 sec everytime.

Now my question is : Is it possible to use any other method in xml parsing so that i can make the xml quering much faster than database query.


pls help if possible

Ranjith.M
 
sorry i failed to tell u one improtant thing :

i'm using java xml parser - JAXP.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top