On a Mysql database of 60000 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 log WHERE (field1 = ? and field2= ? )|); $sth->execute( $a1, $a2 ); $total = $sth->rows; where "id" is a primary key field Thanks david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]