http://qs321.pair.com?node_id=320274


in reply to Re: Re: Re: fethrow_array return value
in thread fetchrow_array return value

and the fastest too.

Perhaps the most intuitive, but not necessarily the fastest (update: the fastest way to determine if there are any rows, that is, as the OP asked for). If your database is able to return rows as they're found (i.e. it doesn't have to return the entire result set like MySQL), and if there are any rows, it can be faster to do a select 1 from table... than to do a select count(*) from table....

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: fethrow_array return value
by Roger (Parson) on Jan 10, 2004 at 03:05 UTC
    I meant the fastest way to determine the number of rows though.