Re: Need help optimizing this (simple) query

2001-03-13 Thread Jordan Russell
speculation though. (If only a MySQL developer could clarify this... ;) Jordan Russell - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To re

Re: Need help optimizing this (simple) query

2001-03-12 Thread Jordan Russell
++-+ Adding an index for dir_id on files did not help (see my other post). Jordan Russell - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/

Re: Need help optimizing this (simple) query

2001-03-12 Thread Jordan Russell
T 1; But it actually made this query slower -- 0.07 sec instead of 0.03! SELECT files.id, dirs.name FROM files, dirs where files.dir_id=dirs.id ORDER BY files.date DESC LIMIT 1; Jordan Russell - Before posting, please

Re: Need help optimizing this (simple) query

2001-03-12 Thread Jordan Russell
files.date DESC LIMIT 1; And I tried reversing the column/table order; that didn't help either: SELECT dirs.name, files.id FROM dirs, files where dirs.id=files.dir_id ORDER BY files.date DESC LIMIT 1; Jordan Russell - B

Re: Need help optimizing this (simple) query

2001-03-12 Thread Jordan Russell
ESC LIMIT 1; SELECT name FROM dirs WHERE id=; Later I want to use a LIMIT of 100 or more so I don't think using the multiple queries will be an option then... Jordan Russell - Before posting, please check: http:/

Re: Need help optimizing this (simple) query

2001-03-12 Thread Jordan Russell
> You have no where clause, so no index is used. Oops, missed this part. Where exactly do I need a WHERE clause, and for what? The first query doesn't have a WHERE clause and yet it appears to be using the "date" inde

Re: Need help optimizing this (simple) query

2001-03-12 Thread Jordan Russell
where the time does add up... My real question is, why does MySQL not use any index to sort when LEFT JOIN is used. (Refer to the EXPLAIN SELECT output at the end of my message.) Jordan Russell - Before posting, please check

Need help optimizing this (simple) query

2001-03-12 Thread Jordan Russell
NULL|NULL | NULL | 5000 | Using filesort | | dirs | eq_ref | PRIMARY | PRIMARY | 4 | files.dir_id |1 | | +---++-------+-+-+--+--+ + Thanks very much in advance for any assistance. Jordan Russell ---

Re: MySQL 3.23.34a - "Lost connection to MySQL server during query"

2001-03-12 Thread Jordan Russell
piece of the old server was still running(?). I didn't ensure the old server was stopped before I upgraded the RPM... Jordan Russell - Before posting, please check: http://www.mysql.com/manual.php (the manual) htt

Re: MySQL 3.23.34a - "Lost connection to MySQL server during query"

2001-03-12 Thread Jordan Russell
lem anymore. :/ I was getting it very frequently yesterday (on almost every try). I'm not sure what has changed since then. I'll let you know if the problem happens again and try to narrow down the exact steps to reproduce. Jordan Russell -

Re: Installation on RH7 box

2001-03-12 Thread Jordan Russell
ll of the latest RedHat updates installed, if that makes any difference. Jordan Russell - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) T

MySQL 3.23.34a - "Lost connection to MySQL server during query"

2001-03-11 Thread Jordan Russell
arted Same thing works fine in 3.23.33 (I've gone back and checked). Jordan Russell - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To

Indexes not used when LEFT JOIN is used?

2001-03-11 Thread Jordan Russell
read reports of similar-sounding problems in the mailing list archive, but I can't seem to find a working solution... Thanks. Jordan Russell - Before posting, please check: http://www.mysql.com/manual.php (the manua