query performance

qwertyjjj

Registered User.
Local time
Today, 01:18
Joined
Aug 8, 2006
Messages
262
Bear with me on this one as the query looks a mouthful although it's fairly simple.
I started with the following query, which was working working very quickly and almost instantaneously bringing back results. Essentially, it is a number of nested select statements bringing back data and joining on the first table, Structure, to group and filter the results. I had to do it this way as there are no distinct relationships between the zarinvreg, zarageddebt, or baddebt tables (not 100% anyway).

Attached on SQL_Ok.txt

I then had to add some extra joins in and all of a sudden the query has slowed to 10 seconds. There's nothing particularly heavy about these extra joins but they have a couple of WHERE caluses in them. I tried indexing all the fields in every table in the DB and that didn't help at all.

Attached on SQL_SLOW.txt

Any ideas on how to improve this, some things to try, or why the massive delay in processing ? The same query is pretty fast on SQL Server though...just not Access
 

Attachments

Users who are viewing this thread

Back
Top Bottom