Sloooow Queries

G

Gerard

Hey all,
When I am running queries through Access to SQL, all
the queries are fine, except those which have more than
one join(left or right). One join is fine, but multiple
joins of 2 or more, take forever to resolve. I understand
that SQL is not designed for this, I was just wondering if
there is any way (Indexes, etc...) to speed these up. I
am also open to the idea of Views, as I understand that is
the preferred way to join tables with SQL Server. Below
is one of the queries in question. If anyone wants DDL
and data, just post and I'll get on it. Any help is
appreciated as always.

Thanks,
Gerard
 
V

Vadim Rapp

Hello Gerard:
You wrote on Fri, 4 Jun 2004 12:50:31 -0700:

G> When I am running queries through Access to SQL, all
G> the queries are fine, except those which have more than
G> one join(left or right). One join is fine, but multiple
G> joins of 2 or more, take forever to resolve.

Most likely, you need to create the indexes on the tables involved in the
joins.

G> I understand that SQL is not designed for this,

Well, in fact just the opposite: SQL is designed exactly for this :)

G> I was just wondering if there is any way (Indexes, etc...) to speed
G> these up. I am also open to the idea of Views, as I understand that is
G> the preferred way to join tables with SQL Server.

No, it is not. Views are only a form of presentation for your eyes, but
Access and SQL server don't see views as some separate objects when
executing. Views are not precompiled or anything else that might affect the
performance.

G> Below is one of the queries in question. If anyone wants DDL
G> and data, just post and I'll get on it.

Yes, please do. You can even email me the zipped database (of reasonable
size): vadimrapp at sbcglobal.net


Vadim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top