Re: Search algorithm



On Feb 12, 1:33 pm, gg <gi3...@xxxxxxxxx> wrote:
Hello,

I have to find algorithm which
give me contractors whos the best matching to some conditions.
Contractors are stored in DB and number of conditions is up to 20.
Some conditions are importants then another.

At this moment I have two algorithm:

1.
Get all contractors from DB, iterate over set
and give score for matching to conditions.
At the end sort set (scores) and cut result to 100 contractors.

2.Make shot to DB for all conditions apart, get
set contractor idenifiers, give scores for identifiers,
maintain in memory HashMap<Identifier, Scores>
after DB shot update table in memory.

What do You thing about this solution. Have you any another idea ?
Now I'm convinced do 2 solution because first seems to be slow.
I will implement this in 3 layer aplication in Java language.

If you can modify the schema, then add the appropriate indexes to
speed up your queries.

If you show the schema to the database and the exact conditions you
need for your queries, then I guess that better suggestions can be
made.

Depending on the database, a unique, clustered index is often the
golden key to speed.
.



Relevant Pages

  • Search algorithm
    ... give me contractors whos the best matching to some conditions. ... Contractors are stored in DB and number of conditions is up to 20. ... At this moment I have two algorithm: ... maintain in memory HashMap ...
    (comp.programming)
  • Re: Basic newbie question about table layout.
    ... A Job may be performed by Employees. ... A Job may require materials. ... A job may be performed by many contractors. ... See "about designing a database" in Access help and feel free to ask ...
    (microsoft.public.access.gettingstarted)
  • Re: Journey planners using incomplete timetable information
    ... It doesn't work properly for reasons also related to the structure of the NR database. ... Some of the problems experienced are identical to what happened on the last software upgrade a few years back - the loss of previous input to the system when attempting to make alterations to the Short Term database. ... Did not NR think to tell the contractors, or did said contractors not think to do any "homework"? ... Yokel posts via a spam-trap account which is not read ...
    (uk.railway)
  • Re: Application to make tables consistent?
    ... database admin for a group that deals with various contractors in Ontario, ... seperate and keep each contractor seperate; this means that I have 3 ... "Lynn Trapp" wrote: ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Application to make tables consistent?
    ... > database admin for a group that deals with various contractors in Ontario, ... > seperate and keep each contractor seperate; this means that I have 3 ... Lynn Trapp ...
    (microsoft.public.access.tablesdbdesign)