Davide Copelli wrote:
> On a Mysql database of 6 records performs better :
>
> my $sth = $dbh->prepare(qq|SELECT count(id) FROM log WHERE (field1 = ? and
> field2= ? )|);
> $sth->execute( $a1, $a2 );
> $total = $sth->fetchrow_array();
>
> or
>
> my $sth = $dbh->prepare(qq|SELECT id FROM lo
> -Original Message-
> From: Davide Copelli [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 02, 2002 8:58 AM
> To: [EMAIL PROTECTED]
> Subject: COUNT(*) performance
>
>
> On a Mysql database of 6 records performs better :
>
> my $sth = $dbh->prepare(qq|SELECT count(id) FROM l
From: "Davide Copelli" <[EMAIL PROTECTED]>
> On a Mysql database of 6 records performs better :
>
> my $sth = $dbh->prepare(qq|SELECT count(id) FROM log WHERE (field1 = ?
> and field2= ? )|); $sth->execute( $a1, $a2 ); $total =
> $sth->fetchrow_array();
>
> or
>
> my $sth