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

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

B-tree index example plan

B-tree index example plan

- [Instructor] Okay, now let's open our database tool, if it's not already available. Now, I'm going to navigate to the public schema where we've created our example tables. So I'm just going to go up to connections, double click on the Postgres database and drill down through schemas to public to tables. And I'll just show the tables we have. Now, the tables we're primarily interested in are the company_division, company_region and staff table. I'm just going to be working with the staff table in this video. So what I want to do is let's just start with something really simple. Let's do a SELECT count * from staff. So let's do a SELECT count * from staff. And I'm going to run that on the active connection. And that'll show me that we have a count of 1,000. So we have 1,000 rows in the table. Now let's see what the data actually looks like by changing this query to SELECT * from staff. And let's run that. And I'm just…

Contents