"David Buerer" <[EMAIL PROTECTED]> wrote in message
91FBD0B430EFD5118B930060672D982C081148@CAIRO">news:91FBD0B430EFD5118B930060672D982C081148@CAIRO...
> Has anyone bumped into or written a set of good searching routines? I need
> to search across one,two, or three fields in an MySQL database in either
> exact phrase (easy) or keyword with relavence (difficult.)  I'm thinking
> something like a google/yahoo style search.  I've tried MySQL full text
> searches, but the results it returns seem to be just a little to broad and
> you end up with a bunch of irrelevant results.
>
> With respect to the database size that I'm searching in, right now it's
> about 20MB but I'm guessing that within the next 24 months it will be up
> around 2GB.  The first field I'm searching in is a CHAR(255) field.  The
> second field  is a small blob and usually is only about 1 paragraph of
text.
> The thrid field is an entire HTML document and can be many many pages
long.
>

Ouch that sounds nasty...  I've only had to search a 4MB database and
tried to cut time spent searching as much as I could...  I tried every thing
from storing values in an array to various SQL commands...  The
elements at the bottom of the table still took annoyingly long...  Maybe
there'd be a decent, more efficient algorithm for a sorted DB...  If
you can keep it sorted at all times I am quite sure you would be able
to find a decent search algorithm (Binary search - I have never applied
the concept of a binary search algorithm to a DB before)...  Then
again the slowness could have been due to the type of DB I was
searching or due to the location of the DB...  (I was using Paradox
tables, It had to search a different drive and the webserver was
IIS - the good news is that it was pretty efficient when tested against
a copy of the same 4MB db, located on my machine though (localhost)...

> Any help is appreciated,
> David
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to