Re: [PHP] speed - PHP/MYSQL

2005-07-24 Thread balwant singh
Actually the data inserted in MYSQL is at every 2 seconds. i.e. 30 rows in an hour. but we are making report on hourly basis. So i used this method. With best wishes balwant -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] speed - PHP/MYSQL

2005-07-23 Thread Joe Wollard
I agree with Jasper here, you want to make it a point to optimize your queries so that fewer trips are made to the database server. On the topic of indexing, I'm curious as to how you did that and if your using it as intended. In your query you are testing columns `time`,`date` so you'll wa

Re: [PHP] speed - PHP/MYSQL

2005-07-23 Thread Jasper Bryant-Greene
balwant singh wrote: Hi, I have made a webpage in php which retrieves the data from a huge MYSQL tables as below:- $i=0; while ($i<=23) { select a, b from table where hour(time)=$i and date='' order by desc time limit 1; $i++; } then i substract the current hour output from the last hour

[PHP] speed - PHP/MYSQL

2005-07-23 Thread balwant singh
Hi, I have made a webpage in php which retrieves the data from a huge MYSQL tables as below:- $i=0; while ($i<=23) { select a, b from table where hour(time)=$i and date='' order by desc time limit 1; $i++; } then i substract the current hour output from the last hour output for calcuating