There's not actually a lot in it - and it seems to fluctuate either way.
I ran a set of queries twice with benchmark...
select benchmark(100000000, 'select from posts');
select benchmark(100000000, 'select postid, author, subject from posts');
select benchmark(100000000, 'select from posts');
select benchmark(100000000, 'select postid, author, subject from posts');
this is on my local machine, so no worry about server load or anything - results:
Query: ' select benchmark(100000000, 'select from posts');'benchmark(100000000, 'select from posts')
Time: 1.59562206268 - Results: 1
Query: ' select benchmark(100000000, 'select postid, author, subject from posts');'benchmark(100000000, 'select postid, author, subject from posts')
Time: 1.59437322617 - Results: 1
Query: ' select benchmark(100000000, 'select from posts');'benchmark(100000000, 'select from posts')
Time: 1.59819602966 - Results: 1
Query: ' select benchmark(100000000, 'select postid, author, subject from posts');'benchmark(100000000, 'select postid, author, subject from posts')
Time: 1.59087514877 - Results: 1
The table has varchar columns - but as you can see with 100 million iterations it's still not worth worrying about. I do know that count(*) is supposed to be quicker than count(name) as it says somewhere in the manual.
But saying that, it might be on the retrieval part that the lag, if it exists comes in... dammit! Got to go and try it - I'll let you know what happens.
[... time passes]
Ok - it IS a completely different kettle of beans when you do actually start recovering the data. With an inner test loop of
$time2=getmicrotime();
for($i=0; $i<100; $i++)
{
$q='select postid, author, subject from posts';
$db->query($q);
while( $row = $db->fetch_row() )
{
echo ''; //just for the sake of it
}
}
$time2=getmicrotime() - $time2;
And similarly with just * in the first part:
Time 1: 26.3147809505
Time 2: 14.3847360611
So select * is much slower. I also did a search with just author and subject and the time2 dropped by a second.
Man I'm going to sleep better in my bed tonight.