On 21-Jun-01 Chris Petersen wrote:
>> here, @ids is the array, delete in chunks of 64:
>> while ( my(@id)= splice(@ids,0,64)) {
>> $qry="DELETE FROM master WHERE master_id in (".join(',',@id).")";
>> SQLQuery($qry);
>> }
>
> I thought about this, too.. But Mark said that he needed to delete
> here, @ids is the array, delete in chunks of 64:
> while ( my(@id)= splice(@ids,0,64)) {
> $qry="DELETE FROM master WHERE master_id in (".join(',',@id).")";
> SQLQuery($qry);
> }
I thought about this, too.. But Mark said that he needed to delete from the
table where the ID's don't match.
gt; To: Chris Petersen
> Cc: [EMAIL PROTECTED]; Mark A. Sharkey
> Subject: Re: any size limitation as to the size of a query statement?
>
>
>
> On 21-Jun-01 Chris Petersen wrote:
> > Why not do something like:
> >
> > my $q = "DELETE FROM master WHERE mast
On 21-Jun-01 Chris Petersen wrote:
> Why not do something like:
>
> my $q = "DELETE FROM master WHERE master_id NOT IN (";
> $q .= join(',', @masteridarray);
> $q .= ')';
> $dbi_dbh->do($q);
>
> Though this will obviously fall into the same size limitations that you were
> doing
My code generates a large query. I had to increase the size of
"max_allowed_packet" so that this query would work.
I have this in my /etc/my.cnf file:
set-variable = max_allowed_packet=2097152
-bill
-
Before posting, please
Why not do something like:
my $q = "DELETE FROM master WHERE master_id NOT IN (";
$q .= join(',', @masteridarray);
$q .= ')';
$dbi_dbh->do($q);
Though this will obviously fall into the same size limitations that you were
doing, but it should execute a lot faster, and be a bit sma