mi consulta es la sgte:
Cita:
Resulta que se ejecuta con este tiempo: 0.8226 y el CPU se pone a 100%SELECT a.artista,a.alink,c.cancion,c.slink,c.id_file,g.gl ink FROM artistas a, canciones c, generos g WHERE c.id_artista = a.id_artista AND a.id_genero = g.id_genero AND g.glink LIKE 'generodeprueba' ORDER BY c.rating DESC LIMIT 0,124
no se mucho pero busque para ver los problemas y encontre "EXPLAIN" y lo ejecute y tengo los sgtes resultados:
Cita:
creo que es por el numero de filas que tiene la tabla canciones(92034), por favor si alguien me puede dar una solucion para que por lo menos no demore tanto o consuma menos CPU esa consulta, ya que he buscado pero no he encontrado ninguna solucion .. gracias :D id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE c ALL NULL NULL NULL NULL 92034 Using filesort
1 SIMPLE a eq_ref PRIMARY,id_artista PRIMARY 4 mydb.c.id_artista 1
1 SIMPLE g eq_ref PRIMARY,id_genero PRIMARY 4 mydb.a.id_genero 1 Using where
1 SIMPLE c ALL NULL NULL NULL NULL 92034 Using filesort
1 SIMPLE a eq_ref PRIMARY,id_artista PRIMARY 4 mydb.c.id_artista 1
1 SIMPLE g eq_ref PRIMARY,id_genero PRIMARY 4 mydb.a.id_genero 1 Using where