abhinavsingh89 Posted December 2, 2010 Share Posted December 2, 2010 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.. Quote Link to comment https://forums.phpfreaks.com/topic/220479-processing-time/ Share on other sites More sharing options...
jim_keller Posted December 2, 2010 Share Posted December 2, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/220479-processing-time/#findComment-1142414 Share on other sites More sharing options...
abhinavsingh89 Posted December 3, 2010 Author Share Posted December 3, 2010 its not like it is impossible... whenever you scan your computer it calculates first that how long will the scanning going to take and then show the elapsed time and same with copying.. so it is definitely possible.. Quote Link to comment https://forums.phpfreaks.com/topic/220479-processing-time/#findComment-1142454 Share on other sites More sharing options...
fenway Posted December 3, 2010 Share Posted December 3, 2010 Oh, it's impossible -- don't even begin to try. You don't need this number. Quote Link to comment https://forums.phpfreaks.com/topic/220479-processing-time/#findComment-1142486 Share on other sites More sharing options...
abhinavsingh89 Posted December 6, 2010 Author Share Posted December 6, 2010 it is possible... language is not always about predefined function... we are working on it under constant constraints and will come up with solution dont worry.. now if you guys can help its really appreciable... Quote Link to comment https://forums.phpfreaks.com/topic/220479-processing-time/#findComment-1143527 Share on other sites More sharing options...
fenway Posted December 8, 2010 Share Posted December 8, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/220479-processing-time/#findComment-1144484 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.