Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/11/2008, 08:57
Avatar de killerangel
killerangel
 
Fecha de Ingreso: septiembre-2007
Ubicación: Un punto en el espacio
Mensajes: 592
Antigüedad: 17 años, 5 meses
Puntos: 10
consulta disgregada o no?

Hola foro:

si tengo una tabla con un gran numero de registros necesito validar por un dato particular q puede ser, digamos, 1 ó 2

es conveniente hacer

select * from tabla where tipo_dato=1 and xxx;
select * from tabla where tipo_dato=2 and xxx;

o hacer

select * from tabla where xxx ;
y luego validar el tipo_dato con php

que es mas rápido y conveniente?

gacias!
__________________
Sueñen... y trabajen por hacer esos sueños realidad... de eso se construye el futuro!!
Me siento entre la ASP-ada y la PHP-red

Última edición por killerangel; 12/11/2008 a las 09:07