List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:June 19 1999 11:37pm
Subject:Re: HELP with QUERY
View as plain text  
On Sa, 1999-06-19 14:33:46 +0000, Sandrine C. wrote:
> I have on select that seems to work properly, but it is VER VERY
> HEAVY. Do you see how I can enlight it?? My application will work on
> a web application, and I am afraid the time access will be too
> high!!

SELECT
        produit.*
FROM
        produit,
        TH_Produit,
        TH_Iteme AS Th1,
        TH_Iteme AS Th2
WHERE
        produit.PR_Code = TH_Produit.PR_Code
  AND   TH_Produit.THI_Code = Th1.THI_Code
  AND   TH_Produit.THI_Code = Th2.THI_Code
  AND   Th1.THI_Nom = 'Ss cycle 1.1'
  AND   Th2.THI_Nom = 'Ss cycle 1.2'
;

This should be faster.  You see why? :)

But more important for speed: did you create appropriate indexes for
all tables?

Regards,
  Martin
-- 
Martin Ramsch <m.ramsch@stripped> <URL: http://home.pages.de/~ramsch/ >
PGP KeyID=0xE8EF4F75 FiPr=52 44 5E F3 B0 B1 38 26  E4 EC 80 58 7B 31 3A D7
Thread
HELP with QUERYSandrine C .19 Jun
  • Re: HELP with QUERYMartin Ramsch20 Jun
Re: HELP with QUERYSandrine C .20 Jun