The type of the tables are: MyIsam

The Query we use is:

select distinct a.afspraakid, Date_Format(Date_Sub(Concat_ws(' ',
'2000-01-01', a.begintijd), Interval a.reistijdvooraf Hour_Minute), '%H:%i')
As BeginTijd,
a.begintijd As OrgBegin, a.reistijdvooraf, Date_Format(Date_Add(Concat_ws('
', '2000-01-01', a.eindtijd), Interval a.reistijdachteraf Hour_Minute),
'%H:%i') As EindTijd,
a.eindtijd As OrgEind, a.reistijdachteraf, p2.PersoneelID, p2.GSMWerk,
p2.TelWerk, ConCat_ws(' ', p2.Voornaam, p2.Voorvoegsel, p2.AchterNaam,
ConCat_ws('', '(', p2.PersoneelCode, ')')) As Selectie,
aty.afspraaktypecode, aty.Omschrijving, ConCat(trim(r.Naam), ' (',
r.RelatieCode, ')') As Relatie, r.Plaats,
r.Adres1, r.Telefoon, a.datum, a.onderwerp, a.afspraaktypeid, a.prive,
a.opmerking, a.reeksid, a.infobayiiedereen,
a.infobayiafdeling, a.relatieid, a.relatienaam, a.relatieadres,
a.relatieplaats, a.relatiecontactpersoon,
a.datecreated, a.usercreated, a.datelastmodified, a.userlastmodified,
a.reistijdvooraf, a.reistijdachteraf,
aty.AchtergrondKleur, aty.VoorgrondKleur, p3.PersoneelCode As IngevoerdDoor
from tblafspraakselectie ase
Inner join tblpersoneel p4 on p4.personeelid = ase.voor
Inner join tblpersoneel p2 on p2.personeelid = ase.personeelid
left join tblafspraakgenodigde ag on ag.personeelid = ase.personeelid
Left join tblafspraak a on a.afspraakid = ag.afspraakid and a.datum =
'20020405'
left join tblpersoneel p3 on a.usercreated = p3.gebruikersnaam
left join tblafspraaktype aty on aty.afspraaktypeid = a.afspraaktypeid
left join tblrelatie r on r.relatieid = a.relatieid
Where p4.gebruikersnaam = 'Name'
order by ase.volgorde, Date_Format(Date_Sub(Concat_ws(' ', '2000-01-01',
a.begintijd), Interval a.reistijdvooraf Hour_Minute), '%H:%i'),
Date_Format(Date_Add(Concat_ws(' ', '2000-01-01', a.eindtijd), Interval
a.reistijdachteraf Hour_Minute), '%H:%i')


The explain select says:

table   type            possible_keys           key                     key_len ref    
                 rows    Extra
p4      ref             PRIMARY,gebruikersnaam  gebruikersnaam  26              const  
                 1       where used;
Using temporary;
                                                                                       
                                         Using filesort
ase     ref             PRIMARY,personeel,voor  PRIMARY         10              
p4.PersoneelID  1       where used
p2      eq_ref  PRIMARY                 PRIMARY         8               
ase.PersoneelID 1       where used
ag      ref             personeel                       personeel               10     
         ase.PersoneelID 309
a       eq_ref  PRIMARY,datum           PRIMARY         8               ag.AfspraakID  
 1
p3      ref             gebruikersnaam          gebruikersnaam  26              
a.UserCreated   1
aty     eq_ref  PRIMARY                 PRIMARY         8               
a.AfspraakTypeID        1
r       eq_ref  PRIMARY                 PRIMARY         8               a.RelatieID    
         1

-----Original Message-----
From: Thomas Spahni [mailto:tsp@;lawbiz.ch]
Sent: donderdag 24 oktober 2002 17:44
To: Peter Zuidema
Cc: Mysql
Subject: Re: Performance problem


On Thu, 24 Oct 2002, Peter Zuidema wrote:

> Please help,
> We have big performance problems.
> This is the situation:
>
> We haven an Windows NT server with a P355 processor and 256MB Ram. We have
> installed version 3.49 of mysql
> (we have also tried version 3.52).
>
> When we do a select on a table which contains about 10.000 records, we
have
> for about 10 seconds a cpu of 100%.
> We use MyISAM tables and have checked indexes and we have checked if
tables
> need to be repaired.
>
> Is there someone who can give advise to get a better performance of mysql?

Probably someone may be able to help you as soon as you tell us what your
SELECT query looks like and what the result of EXPLAIN SELECT is.

Thomas


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to