From: Julian F. <ju...@be...> - 2003-03-11 02:38:22
|
Ondrej Jombik wrote: >>>- $t_view = VIEWER; >>>- $query = "SELECT reporter_id, COUNT(*) as num >>>- FROM $g_mantis_bug_table >>>- WHERE $specific_where >>>- GROUP BY reporter_id >>>- ORDER BY num DESC >>>- LIMIT $g_reporter_summary_limit"; >>>+ $query = "SELECT reporter_id, COUNT(*) as num" >>>+ . " FROM $g_mantis_bug_table" >>>+ . " WHERE $specific_where" >>>+ . " GROUP BY reporter_id" >>>+ . " ORDER BY num DESC" >>>+ . " LIMIT $g_reporter_summary_limit"; >> >>double quotes wrap onto the next line so we tend to do this all as one >>string instead of having to put the . and the "" on each line. > > > Actually using this approach final query contains a lot of spaces, which > have to be removed by RDBMS SQL parser. I hope you realize this. This is true, and no, I had never considered it. Do you think the extra parsing time has any non-negligable effect on the total time as compared to the query processing time? I would expect it would increase the query time by a thousandth (or a millionth?) of a second which isn't going to amount to anything compared to the time to execute the query, transfer the data to php, parse the code, analyze the data, send the web page to the browser... but I'd be very interested to hear if you think it actually adds any significant amount of time. Do you have any stats? Julian Julian -- ju...@be... Beta4 Productions (http://www.beta4.com) |