Hi, If a table has a primary key selecting count(*) using it maybe faster if there is a difference of the number of rows stored per page. A wide table will do more io than the index. The table names is not very wide but does consume more disk space than than the primary keys index.
sql3> select count(*) from names; count(*) ---------- 88799 1 row(s) selected Elapsed time: 0.100965 sql3> select count(*) from names where name > ' '; count(*) ---------- 88799 1 row(s) selected Elapsed time: 0.096625 sql3> --- [EMAIL PROTECTED] wrote: > Brannon King <[EMAIL PROTECTED]> wrote: > > It's too bad you can't do an offset > > of negative one so that it would start at the > back. That should be darn > > fast. Something like: > > > > select rowid from table limit 1 offset -1; > > > > Two ways to do this: > > SELECT rowid FROM table ORDER BY rowid DESC LIMIT > 1; > SELECT max(rowid) FROM table; > > -- > D. Richard Hipp <[EMAIL PROTECTED]> > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com