List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:May 19 1999 6:18pm
Subject:Re: slowdown
View as plain text  
Xavier BEAUDOUIN wrote:
> 
> Hello !
> 
> Trying to make 3 joins with mysql, we get a lot slowdowns, for small
> amount of data (about 200 entries)...
> 
> eg :
> 
> mysql> select r1.prix,revendeur.nom from materiel,r1,revendeur where
>        materiel.nummat='200' and materiel.nummarq='932' and
>        materiel.numprix=r1.numprix and r1.numrevend=revendeur.numrevend;
> +------+---------------------------------+
> | prix | nom                             |
> +------+---------------------------------+
> | 950  | DIRECT PRICE                    |
> | 695  | NGC                             |
> | 860  | BEST SOURCE INTERNATIONAL (BSI) |
> | 1050 | ASIE MICRO                      |
> | 869  | P6 MICRO                        |
> | 1020 | LITEC COMPUTER                  |
> | 850  | MICRO HOUSE                     |
> | 895  | GROSBILL MICRO                  |
> | 889  | EXCELAND MICRO                  |
> | 875  | CHARLIE 12                      |
> +------+---------------------------------+
> 10 rows in set (17.41 sec)
> 
> We are using MySQL 3.21.33b on debian/linux x86 on a PII/266 with 128MB of
> RAM...
> 
> Is there any way to make this really fast ?
> 
> Thanks a lot
> 
> /Xavier

Hi Xavier

Do you have the following KEYs?
On table materiel: KEY (nummat,nummarq,numprix)
On table rl:       KEY (numprix,numrevend)

If not add them.

You always can check a particular SQL statement with the EXPLAIN syntax.

Tschau
Christian

Thread
slowdownXavier BEAUDOUIN19 May
  • Re: slowdownChristian Mack19 May