icedogas Posted September 19, 2013 Share Posted September 19, 2013 Hello, thx for processwire and answer my question - In wordpress was code <?php echo '<center>'.get_num_queries().' queries '; timer_stop(1); echo ' second</center>'; ?> Wordpress shows how many sql queries makes engine(include cache or without cache) - processwire have solution(code) like this? Link to comment Share on other sites More sharing options...
kongondo Posted September 19, 2013 Share Posted September 19, 2013 Hi Icedogas, Welcome to PW and the forums. If you switched debug on in your /site/config.php/, you would see the queries. Please note debug should only be turned on in dev/testing installs and not on your live/production server. Find this line in /site/config.php $config->debug = false; and change it to $config->debug = true; Now in the Admin, you will see your queries (scroll down to the bottom). Note, this is only for the Admin. For frontend, you will have to do it differently using PHP code... Link to comment Share on other sites More sharing options...
Soma Posted September 19, 2013 Share Posted September 19, 2013 You maybe wan't to look into the debug.inc that comes with the admin theme /wire/templates-admin/debug.inc and counting queries is kinda pointless, the type of queries are important. 2 Link to comment Share on other sites More sharing options...
Pete Posted September 19, 2013 Share Posted September 19, 2013 I think Soma makes a good point with his last sentence - many well-crafted queries can work far quicker than one cumbersome query. Plus the technology has moved on so much in recent years that your server shouldn't really strain under lots of queries. Also, there are many caching options for ProcessWire to cut some of those out (MarkupCache for select lists etc, ProCache to serve a static version of your site and other solutions as well). 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now