in reply to prepare statement within DBI
COUNT(*) should be highly optimized on the database server side, probably not even needing to run through the whole of the datatable, so it could indeed be that most of the time is spent in connecting to the DB and preparing the query.
On a MySQL database with about 70,000 records, COUNT(*) took 1/10 of a second to come back with the result. The database was on the local machine, so transmission time was neglible.
Querying a table with only 27 records, took 0.10 seconds as well.
Probably 0.10 of second is the minimum time to run a query.
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: prepare statement within DBI
by dragonchild (Archbishop) on Aug 25, 2004 at 20:00 UTC | |
by mpeppler (Vicar) on Aug 26, 2004 at 07:07 UTC | |
by dragonchild (Archbishop) on Aug 26, 2004 at 12:06 UTC |