On Tue, 2002-12-10 at 15:15, Jonathan Walther wrote: (stub detector needs size of linked articles)
Well, IF we are not going to store article sizes separately, then we need to retrieve the text of all articles linked to when we render an article page. And THAT means I can do this with a single query after all, instead of three.
Is retrieving, transferring, and separately counting the length of the text of potentially hundreds or thousands of linked articles *really* more efficient than a second query for LENGTH(text), a value which the database should already know and thus does not have to spend time zipping through strings looking for null bytes?
(using LIKE for searches)
Will that be reasonably fast? How would we rank pages in the search?
Yes, quite fast. We can rank pages however we want; we could use an ORDER BY clause to sort results by article title, or by timestamp, or anything.
How is searching currently done?
http://www.mysql.com/doc/en/Fulltext_Search.html
For multi-word searches we AND and OR multiple MATCH/AGAINSTs together in one query, which may not the best way to do it. MySQL 4.0 has boolean features built right in, but we're using the more stable 3.x.
-- brion vibber (brion @ pobox.com)