Google ranks ( between 0 to 10 ) every page of your website. Mostly these ranks depends on number of back links to that page. Highly ranked pages will get higher position in the search results. Find out how to retrieve Google pagerank for given url using php
MySQL has various log system that can help a user to debug and improve query performance. So find out how to list last executed queries in MySQL.