Discussion:
[bdbxml] Performace for case-insensitive search and sorting large number of records
delta 78
2006-05-23 00:24:07 UTC
Permalink
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 also
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

Loading...