G
Guest
I have a query using a where not exists shown below. This query keeps on
choking when runnning. It takes around 3 minutes to run on my machine and on
slower PC's it takes forever. My question is is there an alternative to a
where not exists? Is there a way I can speed up the query? I will tell you
that it is comparing approx. 5000 records from the result of (M or F parts
Without Matching Bradley BOM's_new) and checking against about 90,000 records
in the table (TblDistinctPartandNHA)
SELECT [M or F parts Without Matching Bradley BOM's_new].PART, [M or F parts
Without Matching Bradley BOM's_new].DESCR, [M or F parts Without Matching
Bradley BOM's_new].PCC, [M or F parts Without Matching Bradley
BOM's_new].SOURCEPLT
FROM [M or F parts Without Matching Bradley BOM's_new]
WHERE (((Exists (select * from TblDistinctPartandNHA
where TblDistinctPartandNHA.nha = [M or F parts Without Matching Bradley
BOM's_new].PART))=False));
Dave
choking when runnning. It takes around 3 minutes to run on my machine and on
slower PC's it takes forever. My question is is there an alternative to a
where not exists? Is there a way I can speed up the query? I will tell you
that it is comparing approx. 5000 records from the result of (M or F parts
Without Matching Bradley BOM's_new) and checking against about 90,000 records
in the table (TblDistinctPartandNHA)
SELECT [M or F parts Without Matching Bradley BOM's_new].PART, [M or F parts
Without Matching Bradley BOM's_new].DESCR, [M or F parts Without Matching
Bradley BOM's_new].PCC, [M or F parts Without Matching Bradley
BOM's_new].SOURCEPLT
FROM [M or F parts Without Matching Bradley BOM's_new]
WHERE (((Exists (select * from TblDistinctPartandNHA
where TblDistinctPartandNHA.nha = [M or F parts Without Matching Bradley
BOM's_new].PART))=False));
Dave