B
booner
I have 3 tables ... 1 table list of devices ... 2 other tables contain
references to those devices.
Schema Overview:
Devices - Id - AutoNumber
CSDevices - DeviceID - foreign key to Id of Devices
FSDevices - DeviceID - foreign key to Id of Devices
What I want to get is a distinct list of devices used. I created this
query - and for smaller data sets works just fine:
SELECT DISTINCT Devices.* FROM FSDevices,Devices,CSDevices WHERE
Devices.Id=CSDevices.DeviceId OR Devices.Id=FSDevices.DeviceId
However, when there are lots of CSDevices and FSDevices - the query seems to
lock up (runs for a very, very, very long time).
So looking for a better way to generate this list.
Any/all help much appreciated.
BBB
references to those devices.
Schema Overview:
Devices - Id - AutoNumber
CSDevices - DeviceID - foreign key to Id of Devices
FSDevices - DeviceID - foreign key to Id of Devices
What I want to get is a distinct list of devices used. I created this
query - and for smaller data sets works just fine:
SELECT DISTINCT Devices.* FROM FSDevices,Devices,CSDevices WHERE
Devices.Id=CSDevices.DeviceId OR Devices.Id=FSDevices.DeviceId
However, when there are lots of CSDevices and FSDevices - the query seems to
lock up (runs for a very, very, very long time).
So looking for a better way to generate this list.
Any/all help much appreciated.
BBB