Welcome to this video on using the
analyze command in PostgreSQL for performance tuning. Understanding this command means we need to first understand a few things about the PostgreSQL query planner. Specifically, the query planner is used to evaluate the tables, resources, etc. to figure out what will be the most efficient way to carry out the tasks demanded of it.
That's all well and good but what does this mean for us? To really grasp this, we're going to first download a graphical PostgreSQL client called PSequel. Then we will carry on from there to understanding this command.
video showing installation of PSequel
Good, now let's fire up PostgreSQL and create a database instance.
CREATE DATABASE my_database;
Now let's open PSequel and connect to our database.
video showing connection process linking PSequel to PostgreSQL
Excellent. Now we need to create a table and fill it with some data. Let's get this done.
CREATE TABLE item ( id INTEGER, description...
To see the complete version of this and more awesome articles become a superuser or login