Re: Rating results after relevance. Difficult problem
| From: | George Nicolae | Date: | Wed, 08 May 2002 22:48:39 +0000 |
| Subject: | Re: Rating results after relevance. Difficult problem | ||
| References: | 1 | Groups: | php.db php.general |
| Request: | Send a blank email to php-db+get-19060@lists.php.net to get a copy of this message | ||
send a email to google and ask them how they do? :)
--
Best regards,
George Nicolae
IT Manager
___________________
PaginiWeb.com - Professional Web Design
www.PaginiWeb.com
"Andy" <news.letters@gmx.de> wrote in message
news:20020508184748.15130.qmail@pb1.pair.com...
> Hi there:
>
> I am working on a member search engine. Regarding on the criterias a user
> provides (like should speek english, should be interested in arts...) the
> machine querries the db and returns the results. But I would like to rate
> the results. So All criterias fitt... 100%, Just 1 of 3 -> 33 % and so on.
>
> I did already finish my coding and works fine for a user amount of 20. But
> now I generated 2000 random users and woww!!! Take about 2 minitues to
> querry!!
>
> So there has to be a better way, right?
>
> What I am doing with this version, is to get all the users fitting the
> criteria. Opening a temporary table store the id and the amount of fitting
> criterias in it. Retriving this temporary table and sort it after the most
> wanted user (100% max).
>
> The problem with this, is that on user takes about 0.04 s to check and
store
> in the temp table. If there are 2000 users fitting at least one of the
> criterias thats 2000 * 0.04 s means 400 s = lots of time! Not to imagine
> what happens if there are 100.000 users in the db!!!
>
> So the querry performance is ok, I just need to find a more effective way
to
> rate them. There are 3 tables.
> - user table with most of the data
> - language table, containing the languages the user speak (by the time of
> registering they can select up to 3 languages)
> - interest table, containing the interests of the users (by the time of
> registering they can select up to 20 interests)
>
> Can anybody help on that difficult topic? I would really apreciate any
hint
> on that.
>
> Thanx in advance,
>
> Andy
>
>