Guyz Im new to sql and hope you guyz can help me. Ok i have 2 queries getting data from the same table and same parameters. The problem is one takes less than a second to give results and the other takes 7 minutes!!!heres the first and the faster oneSELECT Distinct KatabanFROM SFA_DataWHERE Seiban='96609c' and Inspection_Type_ID='P' order by Kataban
SELECT Distinct Lens_TypeFROM SFA_DataWHERE Seiban='96609c' and Inspection_Type_ID='P' order by Lens_Type
can someone pls explain why this happens and how i can optimize the second query? tnx