Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/10/2012, 14:16
Avatar de jmacc
jmacc
 
Fecha de Ingreso: marzo-2007
Ubicación: Mexico
Mensajes: 94
Antigüedad: 17 años, 1 mes
Puntos: 6
Pregunta Consultas Lentas

Que onda Banda.
mi problema es que al realizar la consulta mysql tarda
89.333 segundos en devolver 1000 resultados lo cual me lleva aun error a la hora de visualizar mis datos a través de la web.
Ya que dice que excede el tiempo.

Le deje al apache un tiempo limite de 80 seg y de memoria en 125 MB.

Quisiera saber si el tiempo es correcto o estoy teniendo problemas en mi base de datos.

Le doy mas memoria mas tiempo.
Les dejo un poco de informacion de mi consulta.
Código SQL:
Ver original
  1. id , select_type , TABLE , TYPE , possible_keys , KEY , key_len , REF , ROWS , Extra
  2. '1', 'SIMPLE', 'catstatusb', 'ALL', NULL, NULL, NULL, NULL, '6', 'Using temporary; Using filesort'
  3. '1', 'SIMPLE', 'grupos_beneficiarios', 'ALL', NULL, NULL, NULL, NULL, '2693', 'Using join buffer'
  4. '1', 'SIMPLE', 'localidad', 'ALL', NULL, NULL, NULL, NULL, '3939', 'Using join buffer'
  5. '1', 'SIMPLE', 'grupos1', 'eq_ref', 'PRIMARY', 'PRIMARY', '4', 'ssd.grupos_beneficiarios.id_grupo', '1', ''
  6. '1', 'SIMPLE', 'grupos_beneficiarios_nivel', 'eq_ref', 'PRIMARY', 'PRIMARY','4','ssd.grupos_beneficiarios.id_nivel_grupo', '1', ''
  7. '1', 'SIMPLE', 'beneficiario', 'eq_ref', 'PRIMARY', 'PRIMARY', '4', 'ssd.grupos_beneficiarios.id_beneficiario', '1', 'Using where'
  8. '1', 'SIMPLE', 'ocupacion_unitario', 'eq_ref', 'PRIMARY', 'PRIMARY', '4', 'ssd.beneficiario.id_ocupacion_uni', '1', ''
  9. '1', 'SIMPLE', 'municipio', 'eq_ref', 'PRIMARY', 'PRIMARY', '4', 'ssd.localidad.id_municipio', '1', 'Using index'
  10. '1', 'SIMPLE', 'ocupacion_principal', 'eq_ref', 'PRIMARY', 'PRIMARY', '4', 'ssd.beneficiario.id_ocupacion', '1', 'Using index'
  11. '1', 'SIMPLE', 'ocupacion_subgrupo', 'eq_ref', 'PRIMARY', 'PRIMARY', '4', 'ssd.beneficiario.id_ocupacionsub', '1', 'Using index'
  12. '1', 'SIMPLE', 'grupos', 'eq_ref', 'PRIMARY', 'PRIMARY', '4', 'ssd.beneficiario.vertiente', '1', ''
  13. '1', 'SIMPLE', 'colonia', 'eq_ref', 'PRIMARY', 'PRIMARY', '8', 'ssd.beneficiario.id_colonia', '1', 'Using where'
Buena es algo de lo que les puedo compartir sera, que queda mal la estructura ya que fue algo que se realizo en chinga.
__________________
Los bueno Chicos Acaban Primero.
User Linux: #527435