Hello and welcome to our continuing series on performance tuning our PostgreSQL databases. Today we're focusing on a very important method in the PostgreSQL command line up and that is explain. To understand the idea behind explain we first need to gain an understanding about the PostgreSQL query planner. For those who have watched our video about analyze, some of this will be a review. For others, this will be critical information.

The query planner's job is to assess the landscape of your database to determine the most efficient ways to complete the tasks that will be demanded of it. It will evaluate the size of your tables, the content and size of the rows, etc. then use that to determine the pathway to carry out the operations. If this seems abstract, that's okay. We will use a concrete example to get this going.

First, let's open PSequel and handle some mundane tasks for getting our database and table up and running.

video showing PSequel open then connecting...