Jump to content

Processing Time


abhinavsingh89

Recommended Posts

can we anyhow know the query's processing time before even executing the query... like if there is database of 400k records then how long will our query take for execution before even executing the query.. ie pre processing time??

for ex if a query takes .04 sec for execution then i need to know this time before even executing the query..

 

 

Link to comment
https://forums.phpfreaks.com/topic/220479-processing-time/
Share on other sites

Processing time for a query is dependent on a lot of factors (underlying hardware, caching, current load of the server), so there's no way to determine how long it will take before you actually execute it. It's like estimating how long it will take you to drive somewhere. You can't always know if you're going to have car trouble or run into traffic; the best you can do is make an educated estimate based on historical data. If a sampling of 1,000 random executions of your query take an average of 0.5 seconds, the next one will probably take about 0.5 seconds.

Link to comment
https://forums.phpfreaks.com/topic/220479-processing-time/#findComment-1142414
Share on other sites

No, it's ACTUALLY impossible -- it's not just hyperbole.

 

Unless you're running this query with only a single user, no outside connections, no INSERT/UPDATE statements, no query cache, etc., you'll NEVER be able to know exactly how long a query will take.

 

This isn't my opinion -- it's fact.

Link to comment
https://forums.phpfreaks.com/topic/220479-processing-time/#findComment-1144484
Share on other sites

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.