List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:July 28 1999 7:36pm
Subject:Re: query parser
View as plain text  
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)
Thread
Is MySQL compatible wh MS SQL 6.5Irwin26 Jul
  • Re: Is MySQL compatible wh MS SQL 6.5Sasha Pachev27 Jul
  • Is MySQL compatible wh MS SQL 6.5sinisa27 Jul
    • Re: Is MySQL compatible wh MS SQL 6.5jonathan michaels27 Jul
      • Re: Is MySQL compatible wh MS SQL 6.5sinisa27 Jul
        • Re: Is MySQL compatible wh MS SQL 6.5jonathan michaels28 Jul
        • query parserMiso Pach28 Jul
          • Re: query parserSasha Pachev28 Jul
            • Re: query parserMiso Pach29 Jul
              • Re: query parserSteve Edberg29 Jul
                • Re: query parserThimble Smith29 Jul
  • Re: Is MySQL compatible wh MS SQL 6.5Van28 Jul
    • Re: Is MySQL compatible wh MS SQL 6.5sinisa28 Jul