Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / November 2007

Tip: Looking for answers? Try searching our database.

Slow querying combo box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Benyo - 05 Nov 2007 15:01 GMT
I have a combo box which is to display records not in another table.

tblEDLog has 180,000 records and will continue to grow
tblProcesses tracks processes on each record in tblEDLog

I'd like the combo box to display records from tblEDLog that aren't in
tblProcesses. The sql I have works, but is extremely slow because each record
is being checked. Doe anyone have any suggestions to speed up the query
result.

SELECT MedicalRecordNumber, AccountNumber FROM tblEDLog WHERE tblEDLog.
AccountNumber Not In (SELECT AccountNumber FROM tblProcesses);

Thanks for your ideas.

Dave
KARL DEWEY - 05 Nov 2007 15:59 GMT
See if this is faster --
SELECT tblEDLog.MedicalRecordNumber, tblEDLog.AccountNumber
FROM tblEDLog LEFT JOIN tblProcesses ON tblEDLog.AccountNumber =
tblProcesses.AccountNumber
WHERE (((tblProcesses.AccountNumber) Is Null));

Signature

KARL DEWEY
Build a little - Test a little

> I have a combo box which is to display records not in another table.
>
[quoted text clipped - 12 lines]
>
> Dave
David Benyo - 05 Nov 2007 16:19 GMT
That works quite a bit faster. Thanks for the help.

>See if this is faster --
>SELECT tblEDLog.MedicalRecordNumber, tblEDLog.AccountNumber
[quoted text clipped - 7 lines]
>>
>> Dave
Klatuu - 05 Nov 2007 16:16 GMT
This link will give you some good info on this situation:
http://allenbrowne.com/ser-32.html
Signature

Dave Hargis, Microsoft Access MVP

> I have a combo box which is to display records not in another table.
>
[quoted text clipped - 12 lines]
>
> Dave
David Benyo - 05 Nov 2007 17:07 GMT
Thanks for the link. I looked into this option, but wouldn't serve the
purpose as this is more for a lookup type combo. Granted my combo is a type
of lookup, but I need to display all records not processed yet.

I have computer illiterate user (actually jumped the first time seated in
front of a computer when the instructor told her to grab the mouse) that
needs to match records in the database with paper charts. Therefore she'll
need to see all records needing attention in-case she doesn't have the paper
chart in hand.

>This link will give you some good info on this situation:
>http://allenbrowne.com/ser-32.html
[quoted text clipped - 3 lines]
>>
>> Dave
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.