> Okay, then I'll go through it point by point :) Thanks. Helps a lot.
> Yes they're the same. How you index depends on your queries. > Generally, just look at what your doing in your where clauses. If > you're looking up rows based just on the path, then index path. If > you're looking up rows based on path, md5, and mime at the same time, > then index across all three. If you're doing both of the above, then > index across all three -- any prefix of an index can be used as an > index. So there is no magic bullet that indexes everything so it works well with any given query? Does it help to index each field by itself for general queries and then I guess you index combinations of fields that will be used together in a WHERE clause? Does ORDER BY use indexes too? Would this need an index by md5 and mime or md5, mime, and path? SELECT * from files WHERE md5 = 'blah' AND mime = 'blah' ORDER BY path; > Depends on the query :) On a well-indexed table, a simple select > should report no more than a tenth of a second, even on a P133. Of > course, that partly depends on how much memory you have... More > memory is always a good investment. Guess I'll hafta work on it. My memory is limited to 32M on this development machine but I figure the more the development machine sucks then the faster the code should run on the end server if the code runs okay on the dev box. :) --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php