Re[2]: MySQL Techniques

by Nathan Lyle <nathan(at)upwebmaestro.com>

 Date:  Sat, 7 Dec 2002 17:35:58 -0500
 To:  "hwg-techniques" <hwg-techniques(at)hwg.org>
 References:  upwebmaestro yerpso D1C4FN01
  todo: View Thread, Original
> The reason of course the join on the third table runs so slow is that you
> are doing  in the order of  46,734 *238,350 queries! (It's not quite this
> bad, but I'm sure you get the point).

Ugh, yeah. As of the moment, I'm creating three temporary tables
(representing the winnowed down versions of the actual tables) and
then doing the join part of the query, which *did* knock some time
off, but not as much as I'd like to see. In some "worst case"
scenarios, like finding all the songs with the word "Love" in them, by
artists with the name of "John" (generic type keywords bring out more
results) there's still a good 10 second pause while MySQL hashes
things out.

I'm wondering if maybe I'm not understanding the concepts and useage
of keys/indexes. Maybe that's where my problem is?

I'm sending a description of my tables and a sample query in a minute
that'll hopefully shed some light for someone. :) I've got a few
places to send it, so will be doing so seperately from this
response...

~ The U.P. Web Maestro (Nathan Lyle)

  E-Mail: nathan(at)upwebmaestro.com
  Online: www.upwebmaestro.com
   Phone: (906)485-4806

"640K ought to be enough for anybody." - Bill Gates, 1981.

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA