Hello!

I have a questionto those lovers of DBI and Databases: which method is faster 
to know the number of rows of a query:

$sth->rows

or 

my query but with a COUNT(id) and retrieve the value with:

$query->bind_columns(undef, \$total);

The table its 'big' cause it will manage like 12,000 rows.

In $sth->rows I have this:

SELECT idport FROM ports WHERE port='$portnumber';

in the bind_columns case I have

SELECT COUNT(idport) FROM ports WHERE port='$portnumber'.

I know that I can test it with EXPLAIN in MySql, however Im testing it with 
150 records, not with 12,000 (or more) that will be the real size of the 
table.

Thanks!
-- 
Pablo Fischer Sandoval ([EMAIL PROTECTED])
http://www.pablo.com.mx
http://www.debianmexico.org
GPG FingerTip: 3D49 4CB8 8951 F2CA 8131  AF7C D1B9 1FB9 6B11 810C
Firma URL: http://www.pablo.com.mx/firmagpg.txt

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to