[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

MySQL tabel og index'



Har en kunde database med en tabel som indeholder 448.438 records, hvilket i MySQL ikke er noget videre.

Men når der bliver kørt backup på den database, tager det 16 min!!!
Slow-query loggen viser at det er den ene tabel som trækker tiden ud og nu skal jeg har fundet ud af hvordan jeg for lavet om på det.


Jeg ændre ikke selv i tabel strukturen, men beder kunden om selv at gøre det, da der pt. er en ting som stikker mig i øjenene.
Tabellen fylder 169.448 KB, hvor af de 62.114 er data og de 107.334 KB er index. Det er lige voldsomt nok!


Jeg har dumpet create tabel som ser sådan her ud:

CREATE TABLE `ETTABELNAVN` (
`ID` int(10) unsigned NOT NULL auto_increment,
`navn` varchar(255) default NULL,
`sammensatnavn` varchar(255) default NULL,
`conavn` varchar(255) default NULL,
`adresse` varchar(255) default NULL,
`tom1` varchar(255) default NULL,
`postnr` smallint(255) default NULL,
`bynavn` varchar(255) default NULL,
`telefon` varchar(255) default NULL,
`telefax` varchar(255) default NULL,
`web` varchar(255) default NULL,
`email` varchar(255) default NULL,
`kode1` varchar(10) default '0',
`kode2` varchar(10) default NULL,
`kode3` varchar(10) default NULL,
`kode4` varchar(10) default NULL,
`kode5` varchar(10) default NULL,
`kode6` varchar(10) default NULL,
`kode7` varchar(10) default NULL,
`kode8` varchar(10) default NULL,
`kode9` varchar(10) default NULL,
`kat1` varchar(255) default NULL,
`kat2` varchar(255) default NULL,
`kat3` varchar(255) default NULL,
`kat4` varchar(255) default NULL,
`kat5` varchar(255) default NULL,
`kat6` varchar(255) default NULL,
`kat7` varchar(255) default NULL,
`kat8` varchar(255) default NULL,
`kat9` varchar(255) default NULL,
`keywords` text,
`gotfile` tinyint(3) default '0',
PRIMARY KEY (`ID`),
KEY `kodedex` (`kode1`,`kode2`,`kode3`,`kode4`,`kode5`,`kode6`,`kode7`,`kode8`,`kode9`),
KEY `postbydex` (`postnr`,`bynavn`),
KEY `navndex` (`navn`),
KEY `katdex` (`kat1`(10),`kat2`(10),`kat3`(10),`kat4`(10),`kat5`(10),`kat6`(10),`kat7`(10),`kat8`(10),`kat9`(10)),
KEY `tlfdex` (`telefon`),
FULLTEXT KEY `ftkatdex` (`kat1`,`kat2`,`kat3`,`kat4`,`kat5`,`kat6`,`kat7`,`kat8`,`kat9`),
FULLTEXT KEY `ftKode` (`kode1`),
FULLTEXT KEY `ftkoder` (`kode1`,`kode2`,`kode3`,`kode4`,`kode5`,`kode6`,`kode7`,`kode8`,`kode9`)
) TYPE=MyISAM;


Jeg mener selv det er overkill at have så meget index på data af den type.

Nogen som har et forslag eller erfaring med den slags?

/Nis



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *