As far as I know, they should be the same. The only case in which I can see
count(colname) would be slower is if it doesnt count rows that contain null
values for that column (this is only a guess, I dont know if count does that
or not).
ryan
> Would count(*) show the same performance as count(1)???
>
> Siomara
>
> >Actually, as far as performance goes, it depends on table types. Most of
> >the MySQL table handlers keep an internal count of record numbers. Thus,
a
> >select count(*) from table; is as fast as it gets.
> >
> > > Well ...
> > >
> > > I don't know enough about mysql but it must allow you somehow to
specify
> >the
> > > column by number as in Oracle and other DBs
> > >
> > > SQL> select count(*) from product;
> > >
> > > COUNT(*)
> > > ----------
> > > 10
> > >
> > > SQL> select count(1) from product;
> > >
> > > COUNT(1)
> > > ----------
> > > 10
> > >
> > > Once you just want to count the rows the performance of your select
will
> >be
> > > much better if you specify a column rather than *.
> > >
> > > Siomara
> > >
> > > >Hi,
> > > >
> > > >is it possible to get *one* quick result with the rowcount of each
> >table
> >in
> > > >one database, without knowing the column-names?
> > > >
> > > >this does *not* work:
> > > > select count(t1.*), count(t2.*)
> > > > from table1 t1, table2 t2
> > > >
> > > >Manual doesn't say anything about that.
> > > >
> > > >Greetings,
> > > >Ansgar Becker
> > > >
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php