From the course: Advanced SQL for Data Science: Time Series

Unlock the full course today

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

Timing a query

Timing a query - SQL Tutorial

From the course: Advanced SQL for Data Science: Time Series

Start my 1-month free trial

Timing a query

- [Instructor] Now I'm starting where we left off in the last video. We're in pgAdmin, and we've just executed a script that creates a schema which includes two tables, which we'll load some time series data into. Now, in addition to being able to create scripts and execute queries, one of the things that pgAdmin allows us to do is to keep track of the history of the queries that we've executed. Now you'll notice down below there are a number of tabs. We usually work with the message tab open, and that give us the results of the commands we execute. Another tab that's important is the query history. I'm just going to expand the lower window a little bit here and point out that this keeps track of the commands that we have executed. This is useful for two things. One is having a record of the duration of how long each command took to execute. So, for example, in this case, the script took 236 milliseconds to execute. This is useful when you're tuning SQL queries. So you have your…

Contents