Pro.Luv Posted December 7, 2008 Share Posted December 7, 2008 Hi, Can anyone tell me how to get the time of how long it takes to run a query like if I had to run a query like: SELECT * FROM table I need to find out how long it takes to get the data in seconds. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/135912-query-time/ Share on other sites More sharing options...
btherl Posted December 7, 2008 Share Posted December 7, 2008 If you are using psql, you can use the \timing command. If you're using an interface from php, it's probably good enough to just time how long the query takes in php. The microtime() function is good for that. Quote Link to comment https://forums.phpfreaks.com/topic/135912-query-time/#findComment-708496 Share on other sites More sharing options...
santhosh_89 Posted April 11, 2009 Share Posted April 11, 2009 Better you can use explain analyse in postgres,It will give the output clearly. Quote Link to comment https://forums.phpfreaks.com/topic/135912-query-time/#findComment-807093 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.