[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
 

Re: [PROGRAMMERING] XML til MySQL



2011/12/2 Jesper Jarlskov <sslug@sslug>:
> Hej Liste

[...]

> Vil der være noget performance at hente hvis jeg sætter op en ny database,
> indlæser alt vores database til den nye database, og derefter overflytter
> data fra den nye database, til vores produktionsdatabase?

En optimering er ihvertfalde, hvis du indsætter så mange rækker som
muligt af gangen
istedet for en masse små inserts.

F.x.

INSERT INTO `usergroup` VALUES (1,'admin','add/delete children, users,
usergroups, newsletters'),(2,'superuser','add/send
newsletters'),(3,'normal user','view but not change');

Hvor der bliver indsat tre rækker med en statement.

Ifølge
http://dev.mysql.com/doc/refman/5.0/en/insert-speed.html
så kan det være 20x gange hurtigere at indlæse en masse rækker ved at bruge:

LOAD DATA INFILE ...

istedet for at bruge sql INSERT.

Mvh
Martin


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2012-01-01, 02:01 CET [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] *