The best way to speed inner joins is to index the column that is the foreign key.

For example, if your join is of the form:
SELECT T1.ORDERNO, T2.CUSTNO, T2.CUSTNAME
FROM ORDERS T1, CUSTOMERS T2
WHERE T1.CUSTNO = T2.CUSTNO ;

then you need an index on ORDERS.CUSTNO

In other cases, depending on exactly what the query is, you can also sometimes obtain 
benefit by rewriting the SQL to use sub-queries, unions, and other techniques.


----- Original Message -----
From: "Cesar Riba" <[EMAIL PROTECTED]>
Date: Thu, 1 Apr 2004 11:10:18 +0200
To: <[EMAIL PROTECTED]>
Subject: Consult about SQL

> Hello,
> 
> 
>       I'm a problem when use a SQL query that have one or various INNER JOIN this
> is very very slow. How I can accelerate this tipus of query.
> 
> 
> 
> Thanks.
> 
> 
> C�sar
> 
> 
> 
> 
> 
> 
> -- 
> u2-users mailing list
> [EMAIL PROTECTED]
> http://www.oliver.com/mailman/listinfo/u2-users

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to