Jump to content

Prcocessing Time and Pre Processing Time


abhinavsingh89

Recommended Posts

I am currently working on a research based project and I need to know the processing time and pre- processing time for executing an query through PHP. I have a database which has several thousand values and i am entering a primary key value to fetch a record. Now i need to know the time before executing the query that how much processing time will the query take and then how much time it took to process query. Both will the same but i need to find the time before processing the query. Can anyone help me with that??

For processing time i think i will capture the time before executing the query and after execution, then i will subtract both the times to find out the processing time.. but main thing is i need to find this time before executing the query... so can anyone suggest anything... any help is appreciated...

 

Thanking You,

Abhinav

You should be able to use the microtime() function to get a timestamp in microseconds (and store it in a variable), run your query, then call microtime() again. Subtracting the two will give you the number of microseconds it took for PHP to run your query.

got it... this will work for processing time but i need to know this time before even executing the query.. i mean i need to know this time before processing (pre processing time).. and thanx for the microtime() function i will use it to find the processing time....

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.