hi - am running the following query and seems to take ages.
i am not using mysql but an unknown database system on a unix box - i have no control over the database but have purchased an odbc driver that seems very 'clunky' after using mysql - this is an sql statement question rather than a mysql tech question.
if i run this
it takes less than a second
however if i run this
it takes 5+ secs - is there something wrong with this sql statement ? - anything i can try to speed it up?
i am not using mysql but an unknown database system on a unix box - i have no control over the database but have purchased an odbc driver that seems very 'clunky' after using mysql - this is an sql statement question rather than a mysql tech question.
if i run this
Code:
SELECT
MK_01_vehicleRecords.registrationnumber, MK_01_VehicleRecords.vehiclenumber
FROM MK_01_VehicleRecords
WHERE (MK_01_VehicleRecords.vehiclenumber = '36176')
it takes less than a second
however if i run this
Code:
SELECT
MK_01_vehicleRecords.registrationnumber, MK_01_VehicleRecords.vehiclenumber
FROM MK_01_VehicleRecords
WHERE (MK_01_VehicleRecords.vehiclenumber = '36176'
OR MK_01_VehicleRecords.vehiclenumber = '109786'
OR MK_01_VehicleRecords.vehiclenumber = '115970'
OR MK_01_VehicleRecords.vehiclenumber = '126969'
OR MK_01_VehicleRecords.vehiclenumber = '131468'
OR MK_01_VehicleRecords.vehiclenumber = '136116'
OR MK_01_VehicleRecords.vehiclenumber = '138911'
OR MK_01_VehicleRecords.vehiclenumber = '202313'
OR MK_01_VehicleRecords.vehiclenumber = '202593'
OR MK_01_VehicleRecords.vehiclenumber = '204048')
it takes 5+ secs - is there something wrong with this sql statement ? - anything i can try to speed it up?