Új hozzászólás Aktív témák

  • VladimirR

    nagyúr

    válasz cucka #559 üzenetére

    mysql> explain extended SELECT posts.topic_id, COUNT( posts.num ) AS num, postnum FROM posts INNER JOIN topics ON posts.topic_id = topics.topic_uid GROUP BY topic_id HAVING num != postnum;
    +----+-------------+--------+------+------------------+---------+---------+----------------------------+--------+---------------------------------+
    | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
    +----+-------------+--------+------+------------------+---------+---------+----------------------------+--------+---------------------------------+
    | 1 | SIMPLE | topics | ALL | PRIMARY | NULL | NULL | NULL | 104148 | Using temporary; Using filesort |
    | 1 | SIMPLE | posts | ref | PRIMARY,topic_id | PRIMARY | 3 | ph_search.topics.topic_uid | 19 | Using index |
    +----+-------------+--------+------+------------------+---------+---------+----------------------------+--------+---------------------------------+
    2 rows in set, 1 warning (0.02 sec)

Új hozzászólás Aktív témák

Hirdetés