From the course: Advanced SQL for Query Tuning and Performance Optimization

Using PostgreSQL in Codespaces

- [Instructor] In this course we're going to work with Postgres or PostgreSQL databases. Now we have a couple of options. You can install Postgres locally if you choose to. In this course, when I'm demonstrating, I'm going to be actually using Postgres running in GitHub. And GitHub provides a service called Code Spaces which actually makes it much easier to get started. So I've navigated to a GitHub repository for this course. It is Advanced SQL Query tuning performance optimization, all hyphenated. And then there's a suffix within number dash 4413111. That's the URL that we will use or that you can use to access the repository for this course. And then once you've navigated to that repository, if you click on the code button toward the upper right and add a code space, what that will do is it will run a container for you which has Postgres installed along with VS Code or Visual Studio Code and IDE. So we'll be able to work with Postgres directly using a visual studio plugin called SQL Tools. So right now a container is being built for me and this can take a couple of minutes depending on if you have built this container before and some other factors that might influence how long this takes. But in general, it's usually done within a few minutes. When the container build process completes, you'll see a screen with the read me from the repository and it'll have the title advanced SQL for Query Tuning and Performance Optimization. You'll also notice over toward the left in the Explorer, we have an icon which is shaped like a database icon, a cylinder. That is SQL Tools. If we click on SQL Tools, we will see that we have the option of connecting. And so we have connections here. And if you just click on the Postgres SQL database connection and we will see by clicking the Arrow icon, we will see that we have a Postgres database and I will click on that as well and then we have Schemas. And within Schemas we have our public schema. And within public schemas we have tables and views. And under tables, we'll see some tables that we'll be using. So for example, we have a table here called staff and we can see that we have different columns in that table. So when we're working with Postgres throughout this course, we'll be using this database to just demonstrate certain features and capabilities of Postgres.

Contents