List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:May 28 1999 6:30pm
Subject:Re: Mysql.pm error Resource Temporarily Unavailable
View as plain text  
Dan Ray wrote:
> 
> > From: Jim Faucette [mailto:jimf@stripped]
> >
> > Dan Ray wrote:
< ... >
> > Also, depending on MySQL's version you can do multi-inserts with on
> > query:
> > INSERT INTO Products
> > (DEPARTMENT_NO,CLASS_NO,PRICE,SKU,DESCRIPTION,DEPARTMENT,CLASS,UNIT
> > ,FINE_LINE_CLASS_NO,CODE,ID,FINE_LINE_CLASS,) VALUES
> > ('17.00','170.00','0.08','6309.00','1x2 Furring R/L','Common
> > Lumber','Furring, Woodlath & Misc.
> > Items','LF','1701.00','qjix7843','20292','Furring Strip'),
> > ('17.00','170.00','0.08','6309.00','1x2 Furring R/L','Common
> > Lumber','Furring, Woodlath & Misc.
> > Items','LF','1701.00','qjix7843','20292','Furring Strip'),
> > ('17.00','170.00','0.08','6309.00','1x2 Furring R/L','Common
> > Lumber','Furring, Woodlath & Misc.
> > Items','LF','1701.00','qjix7843','20292','Furring Strip')
> 
> Now THIS is interesting! Do you happen to know what the earliest version is
> that supports this?
> 
> Of course, this assumes that I'm spending most of my time building and
> transmitting the query--possibly a very relevent assumtion. However, if the
> time is being taken on insert, will this help? IE. will having multiple
> inserts on a single transaction take as long as inserting each individually?
> 
> While I'm on it, is there any limit to the number of records you could
> insert this way? Would it be possible to parse my whole file and send the
> whole shooting match as a single query?
> 
> The other thing to bear in mind is that for each line, I'm getting SKU where
> SKU = 6309.00 (in this case) so I can know whether to insert or update it.
> So for each line, I'm really doing two queries... Is there any faster way?
> 
> > PS. how are you getting your scripts to the server, FTP or PUT?
> 
> FTP. Why?
> 
> Thanks, Jim!
> 
> Dan Ray

Hi Dan

AFAIK multi INSERT is available since 3.22.xx .

Inserting them all at once is faster.

It is limited by the mysql server variable max_allowed_packet.

Perhaps you can use REPLACE INTO ... instead of INSERT INTO ... (see the manual yourself).

Tschau
Christian

Thread
Mysql.pm error Resource Temporarily UnavailableDan Ray28 May
  • Re: Mysql.pm error Resource Temporarily UnavailableSasha Pachev28 May
  • Re: Mysql.pm error Resource Temporarily UnavailableJim Faucette28 May
    • RE: Mysql.pm error Resource Temporarily UnavailableDan Ray28 May
      • Re: Mysql.pm error Resource Temporarily UnavailableChristian Mack28 May
  • Mysql.pm error Resource Temporarily UnavailableMichael Widenius2 Jun