> Okay, that means, memory is no problem. And disks shouldn't be a
> problem either, because the table fits into memory. (Sorry, don't
> remember the test case anymore. Did it contain INSERTs/UPDATEs?)
No, only one SELECT with 3 joins. Just in case i send this query again:
SELECT f.foto_id, f.imgname, f.path FROM foto f, indeks k1, indeks k2
WHERE f.foto_id = k1.foto_id AND k1.word = 'mati' AND f.foto_id =
k2.foto_id AND k2.word = 'kose' GROUP BY f.foto_id;
> This implies, they are not the same for different versions of MySQL?
> Then, as I said, this is the probably cause for the speed difference.
>
> Could you post the output of both, please?
Ok, here we go (it didn't fit on one line, sorry):
3.22.32 (old and fast) EXPLAIN:
+-------+--------+---------------+---------+---------+------------+------+-------+
| table | type | possible_keys | key | key_len | ref | rows |
Extra |
+-------+--------+---------------+---------+---------+------------+------+-------+
| k1 | ref | idx2 | idx2 | 100 | mati | 986 |
|
| f | eq_ref | PRIMARY | PRIMARY | 4 | k1.foto_id | 1 |
|
| k2 | range | idx2 | idx2 | NULL | NULL | 1470 |
|
+-------+--------+---------------+---------+---------+------------+------+-------+
3.23.32 (new and slow) EXPLAIN:
+-------+--------+---------------+---------+---------+------------+------+-----------------------------+
| table | type | possible_keys | key | key_len | ref | rows |
Extra |
+-------+--------+---------------+---------+---------+------------+------+-----------------------------+
| k1 | ref | idx2 | idx2 | 101 | const | 996 |
where used; Using temporary |
| f | eq_ref | PRIMARY | PRIMARY | 4 | k1.foto_id | 1 |
|
| k2 | ref | idx2 | idx2 | 101 | const | 1264 |
where used |
+-------+--------+---------------+---------+---------+------------+------+-----------------------------+
Newer 3.23.xx have same EXPLAIN
Rgds,
Viljo
---------------------------------------------------------------------
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