[bdbxml] Performace for case-insensitive search and sorting large number of records
"delta 78" <[email protected]> Mon, 22 May 2006 17:24:07 -0700
| Newsgroups | gmane.comp.db.dbxml.general |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_173710_32314201.1148343847876
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi,
Our application needs to support case-insensitive queries on a fairly large
dataset and also needs the results to be sorted per specified field. We als=
o
need this to happen very very fast to keep the Ajax UI responsive. What are
the strategies to speed up these operations?
1. What is the best way to perform a 'contains' type of query in a
case-insesitive manner? I have indexed the reated fields for substring
values and tried queries like this :
query 'collection("MyDB.bdbxml")/Person[contains(lower-case(Name),
lower-case("ABC"))'
I also found a similar question within this mailing list that used text
translation, which is similar to this.
This is obvoisly very slow. Any suggestions on how to do this faster? I
would like to avoid maintaining a deplicate lower-case version of Name.
2. How can I insert records in a container so that they are sorted on some
field? Is there a document that shows how to do this using Java API?
This impacts 'order by' performance of FLOWR queries over a sizable
container. (almost 1 GB of total data with some 50000 documents)
I'll appreciate any ideas.
Thank You,
-D
------=_Part_173710_32314201.1148343847876
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi,<br><br>Our application needs to support case-insensitive queries on a f=
airly large dataset and also needs the results to be sorted per specified f=
ield. We also need this to happen very very fast to keep the Ajax UI respon=
sive. What are the strategies to speed up these operations?
<br><br>1. What is the best way to perform a 'contains' type of query=
in a case-insesitive manner? I have indexed the reated fields for substrin=
g values and tried queries like this : <br>query 'collection("MyDB.bdb=
xml
")/Person[contains(lower-case(Name), lower-case("ABC"))' <br=
><br>I also found a similar question within this mailing list that used tex=
t translation, which is similar to this.<br><br>This is obvoisly very slow.=
Any suggestions on how to do this faster? I would like to avoid maintainin=
g a deplicate lower-case version of Name.
<br><br><br>2. How can I insert records in a container so that they are sor=
ted on some field? Is there a document that shows how to do this using Java=
API?<br> This impacts 'order by' performance of FLOWR qu=
eries over a sizable container. (almost 1 GB of total data with some 50000 =
documents)
<br><br>I'll appreciate any ideas.<br><br><br>Thank You,<br>-D<br><br><br>
------=_Part_173710_32314201.1148343847876--