From the course: Database Foundations: Database Management

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

View a PostgreSQL execution plan

View a PostgreSQL execution plan

From the course: Database Foundations: Database Management

Start my 1-month free trial

View a PostgreSQL execution plan

- [Instructor] We just reviewed the query execution plan, as it's displayed for a SQL Server database. Now let's take a look at the same information in PostgreSQL. I'm going to move this down on my screen a little bit, and copy all of the exercise file scripts to my clipboard. And then I'm going to collapse my SQL Server database and come over the the Postgres version. Let's right click on it, choose new query, and paste in all of that text. Now we don't need to do any column renaming. So I'm going to highlight all of this on line one, down to eight, and get rid of it. And we'll just start with this line that says explain. Now in the Postgres database, you'll notice that we don't get the same explain button up here on the toolbar. But Postgres does have an explained command that we can add to the beginning of a query. I'm going to uncomment this portion here on line number one. So instead of just running the select command, I'm going to start with explain, analyze, and then the query…

Contents