* Soren Ragsdale <[EMAIL PROTECTED]> wrote on 11.01.01 11:30:
> SELECT comics.tagline,votes.score FROM comics,users LEFT OUTER JOIN
> votes ON comics._rowid=votes.comic AND votes.voter=30 WHERE
> users._rowid=comics.author;

I would try the simpler inner join to get the result you want:

SELECT comics.tagline,votes.score FROM comics,votes WHERE
votes.comic=comics._rowid AND votes.voter=30;

It appears that you don't really need the users table here at all. This is
probably (at least in part) what is slowing your queries down.

Also check the output of EXPLAIN SELECT (rest of your query) to see how
MySQL is parsing your query, what indices it is using etc.


-- 
Tomi Junnila <[EMAIL PROTECTED]>
http://www.badzilla.net/~topeju/
Electronics and Information Technology,
University of Turku, Finland

---------------------------------------------------------------------
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

Reply via email to