I have several SELECT
in a PHP page, and I used Dreamweaver to create them.
After going through the code that he generated, there seemed to be a lot of fluff that I could cut in most cases, and the mysql_num_rows()
for each statement was an example.
So, I am wondering if anyone can tell me if this really saves resources - given that the query is executed independently, is there any actual overhead for this?
UPDATE: Following Chriszuma's advice on microtime, here are my results:
//time before running the query 1: 0.46837500 1316102620 //time after the query ran 2: 0.53913800 1316102620 //time before calling mysql_num_rows() 3: 0.53914200 1316102620 //time after mysql_num_rows() 4: 0.53914500 1316102620
So not much overhead seems to be
source share