This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Slow performance-Full text search Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Slow performance-Full text search" Watch "Slow performance-Full text search" New topic

Slow performance-Full text search

Arjun Shastry
Ranch Hand

Joined: Mar 13, 2003
Posts: 1876
For reporting purpose I am displaying some records in browser from one database(MSSQL) table based on some criteria.The fields which I am comparing contain 12-13 character strings.In select query I am comparing the values of these fields.If the total records are less say 100000,it works perfectly but total records are more than 500000(which will be the case in 'production'),getting the results take 'long' like 18-19 secods time.
Query is very simple,Supoose table T and attributes are A1.....An.and A1 and A2 are attributes which I am using in select query:

Any idea on how to improve the performance?

Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Any idea on how to improve the performance?

Have you tried running the query in your database's profiling tool? Most DBs will suggest if indices are needed to improve performance, which is probably the case in this instance.

As an aside, if you have a distinct requirement to provide free text searching over your data it makes sense not to implement this in the database itself, but with a third party IR tool like Lucene.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: Slow performance-Full text search