Results 1 to 6 of 6
Thread: How to Save DB Hits
- 10-15-2010, 06:21 AM #1
Member
- Join Date
- Oct 2010
- Posts
- 2
- Rep Power
- 0
How to Save DB Hits
Dear All,
As i am working on a scoring engine, the logic is as follows
User configure the rules and define a Query against that rule like
Rule
Age > 20 and Age <30 then score 10
SQL
select age from application where id = 'xyz'
if there 500 rules then system needs to make 500 DB calls and every time execute defined query. So I want to reduce these DB calls and want to handle it in XML. Can you please suggest how i can proceed and reduce these DB calls.
Application contain multiple applicants data (personal detail, address, employment etc.) and assets and financial purchased data.
I look forward to your cooperation and a prompt response in this regard.
- 10-15-2010, 08:17 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
It depends on how many calls you've make with time. And also don't execute plain queries, use stored procedures as much as possible. And also if you could index your page then too many calls not make more performance drops as well.
- 10-15-2010, 08:20 AM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Looking at your question, I wonder that do you want to store those details in an XML and process. Actually there are lots of advanced XML parsers are available nowadays, or else you can write your own. If your database in a remote location then it may be a good choice to move with XML. Only overhead with remote databases is data passing, processing will anyhow utilize the same.
- 10-15-2010, 09:07 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
Where are the rules stored?
How are they defined?
Presumably there's a syntax to them.
Are all these rules run against a single application id? That is, is that SQL the same for each rule? I'm guessing not, but then I don't see quite how this works...or what it is trying to achieve.
- 10-15-2010, 10:43 AM #5
Member
- Join Date
- Oct 2010
- Posts
- 2
- Rep Power
- 0
Rules stored in Database, Rules are configurable and we build dynamic SQL against each rule.
Rules are executed against each application, each rule has its on SQL. Its a scoring engine to check the credit worthiness of an applicant but i do not want to limiting for this application. In future i can use for some other applications too.
- 10-15-2010, 10:56 AM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
Similar Threads
-
Hwlp with "Open", "Save", "Save as..."
By trill in forum New To JavaReplies: 3Last Post: 11-02-2010, 09:26 AM -
How can i save the data Internally(auto save)
By Rama Koti Reddy in forum AWT / SwingReplies: 2Last Post: 11-01-2010, 08:31 PM -
o hits while using pharsequery
By vallaru in forum LuceneReplies: 0Last Post: 04-13-2010, 09:46 PM -
Measuring hits for words in a document.
By bodrulalam in forum LuceneReplies: 0Last Post: 02-20-2010, 05:22 PM -
How can I save my XML
By FrankyDee in forum XMLReplies: 1Last Post: 03-27-2008, 03:59 PM


LinkBack URL
About LinkBacks

Bookmarks