Re: [SQL] How to optimize this query ?

2003-08-28 Thread ProgHome
riginal Message- From: Stephan Szabo [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 2:29 PM To: ProgHome Cc: 'Franco Bruno Borghesi'; [EMAIL PROTECTED] Subject: RE: [SQL] How to optimize this query ? On Wed, 13 Aug 2003, ProgHome wrote: > I tried with some LEFT JOINS, w

Re: [SQL] How to optimize this query ?

2003-08-15 Thread ProgHome
As I am using mysql 4.0 right now (we’ve got a stupid problem with the 4.1 with the authentification protocol we can’t figure out) and the last subquery (the one in the last LEFT JOIN) MUST be removed …   So I tried the following query:   SELECT    L.* FROM lead L LEFT JOIN purchase P

Re: [SQL] How to optimize this query ?

2003-08-14 Thread ProgHome
Title: RE: [SQL] How to optimize this query ? Actually, I have got another query where I need to remove the subqueries ... It is almost the same query but this time, I don't search in the table LEAD but in the table MEMBER … HERE are the tables:  affiliate_lockout  (6 rows)  (member_id, aff

Re: [SQL] How to optimize this query ?

2003-08-14 Thread ProgHome
Sorry, I posted the following message on the newsgroups, but it seems that you didn't see it ... I tried with some LEFT JOINS, which give me the possibility to keep the information of the right table. I have now the following query, which is 10 times faster !!! (from 16s to 1.6s) But I'd like t