Jamie Balfour

Welcome to my personal website.

Find out more about me, my personal projects, reviews, courses and much more here.

Jamie Balfour'sPersonal blog

Jamie Balfour'sPersonal blog

When I started to write BalfBlog under the name JBlogs in 2014 I began using the now deprecated mysql commands. After some time messing about I switched to the much faster and more powerful mysqli commands. 

This was the first big change in the history of the code in BalfBlog. Moving to PDO from MySQLi was another big change (probably about the sixth big change in the history of BalfBlog) and I claim it has many performance improvements.

The improvements do not come from querying the database because I know outright that MySQLi is better for that since PDO adds a layer of abstraction over the databases. No, they come from preventing running the query twice - which is an obvious waste of resources.

Now that I use PDO, this is no longer required since the way that binds are done is much better. Creating prepared statements is so easy and this is where the performance gains come from. 

Also, I will point out as it seems a good time. Performance is being thouroughly tested at this point in time under many use cases. PDO definitely seems the way to go however, and it will also allow me to easily switch around database commands to allow other databases to be used in the future. 

Also, not every part of the dashboard has converted yet, but most have.

Posted by jamiebalfour04 in BalfBlog
balfblog
pdo
2.3
efficient
faster
mysql
mysqli
Powered by DASH 2.0