Miso Pach wrote:
>
> Hello,
>
> I am wondering which is faster:
>
> 1. using functions in the select clauses
>
> -or-
>
> 2. selecting just columns and doing processing
> outside the queries in Perl.
>
> Let's say I am using the fastest method that DBI can provide
> to fetch the rows fetchrow_arrayref().
>
> #1 will be slower on the query parser but faster on
> computing results. #2 will be faster on the parser but
> slower on computing results.
>
> Which is going to be faster if I have say on average 10
> columns and return like 6 rows per query? A column might be
> something like:
>
> if(change > 0, '<IMG SRC=up.gif>',
> if(change < 0, '<IMG SRC=down.gif>',
> <IMG SRC=no.gif>))
>
> Has anybody done some benchmarking on this?
>
> thanks,
>
> Miso
>
Generally processing results on the server is faster than on the client.
You can try a benchmark at let us know what happens in your case.
--
Sasha Pachev
http://www.sashanet.com/ (home)
http://www.direct1.com/ (work)