When I was working in code migration project, I got chance to fine tune code as well as database side. Everything was fine while running the site, but when its come to load testing its creating issue with select queries side.
Due to the un-optimized queries, which was creating slow queries and site become too slow.
But how we recognize its was from slow queries, but it may be in code side also right.
While code migration each and every module was working fine, when it was combined as entry site it was creating a problem. So instead of checking the each and every select queries in code part.
We plan to lock the Slow queries, I will tech you how to enable slow queries in wamp server.
What is Slow Query ?
Query which took more than long_query_time seconds to execute, default values for long_query_time are 0 and 10.
How to log the Slow Query in Wamp Server
In Wamp server click the mysql.ini file, search for the slow_query.
You can able to see four variables for slow query logs.
– which enable / disable the slow queries logs.
– log the logs of the slow queries with given path.
– query will log which take more than mentioned seconds in long_query_time variable.
After a long gap I am plan to post an article in Html5 local Storage, what is the use of local Storage and which way it will be helpful to storing the data.
But its not possible to store huge data like local Storage. HTML5 local Storage can store huge data with key pair value format, also support fetching, remove and clearing the data.
After posting content about MongoDB, just thinking of posting another content about MongoDB but with PHP. Yes this post about connecting MongoDB with PHP, if your are using Windows OS you can check with below link about MongoDB installations & enable extension in Wamp Server.
Before starting up our tutorial let’s check MongoDB is running status by executing simple script to check in PHP.
MongoClient is used to create and manage the connections between PHP and MongoDB.
$con = new MongoClient( "mongodb://127.0.0.1:27017" );
Let’s create simple feedback form to add and show the data from MongoDB. first create demo database. You no need to create collection because when you do the first insert collection will automatically created and insert the data into it. Continue reading “How to connect MongoDB using PHP”→