actually, I'm not "stuck" with a flat text file, but I cant find a really good way to split things up... for instance, if the user searches for "boy", making a file called "boy.resutls" with that info, would not work becuase some of the results from a "boy" search also come in a "girl" search, and a "child" search. But not all of them. If I did that I would have to open and search all the files anyway, defeateing the whoe purpose of splitting them up.
If, as the results came in, I put them in seperate files based on the first digit, like a "1" file, a "2" file a "3" file, and then opened each file as it is needed in future searhces, would this be faster do you think?
Is is faster to open one file with all entries and search it, or open various files with less entries and search each one individually as needed?
Would it be faster to put them in Mysql and then for each one do a search like --"SELECT * FROM okphotos WHERE id LIKE '$id';-- for each result?
I am trying all these as we speak, but your suggestions will save me from trying something in vain.. Thanks.
kbeen.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.