53GB

5 PostgreSQL Functions for Monitoring & Analytics



5 PostgreSQL Functions for Monitoring & Analytics

#PostgreSQL is ideal for real-time monitoring and historical analysis, but how do you write *efficient* queries to track real-time performance metrics and spot trends?

We know it can be tricky, and in this coding session, @avthars demos his favorite (essential!) queries for common #DevOps scenarios, including TimescaleDB-specific functions for complex #timeseries analysis.

Youโ€™ll get tips, best practices, and resources, so you leave ready to customize each query for your projects.

๐Ÿ›  ๐—ฅ๐—ฒ๐—น๐—ฒ๐˜ƒ๐—ฎ๐—ป๐˜ ๐—ฅ๐—ฒ๐˜€๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ๐˜€
๐Ÿ“Œ Get the Air Quality sample app (ft in our demo) โ‡’ https://tsdb.co/air-qual-repo
๐Ÿ“Œ Check out more advanced analytic functions (Timescale Docs) โ‡’ https://tsdb.co/advanced-queries-docs
๐Ÿ“Œ Learn key SQL functions for time-series analysis โ‡’ https://tsdb.co/time-series-sql
๐Ÿ“Œ Join Timescale Developer Slack โ‡’ https://tsdb.co/TimescaleSlack
๐Ÿ“Œ Start a free Timescale Cloud trial ($300 in cloud credits to start ๐ŸŽ‰) โ‡’ https://tsdb.co/get-started-cloud

๐Ÿฏ ๐—”๐—ฏ๐—ผ๐˜‚๐˜ ๐—ง๐—ถ๐—บ๐—ฒ๐˜€๐—ฐ๐—ฎ๐—น๐—ฒ
At Timescale, we are dedicated to serving developers worldwide, enabling them to build exceptional data-driven products that measure everything that matters. Analyzing this data across the time dimension (โ€œtime-series dataโ€) enables developers to understand what is happening right now, how that is changing, and why that is changing. We are backed by top-tier investors with a track record of success in the industry.

๐Ÿ’ป ๐—™๐—ถ๐—ป๐—ฑ ๐—จ๐˜€ ๐—ข๐—ป๐—น๐—ถ๐—ป๐—ฒ!
๐Ÿ” Website โ‡’ https://tsdb.co/homepage
๐Ÿ” Slack โ‡’ https://slack.timescale.com
๐Ÿ” GitHub โ‡’ https://github.com/timescale
๐Ÿ” Twitter โ‡’ https://twitter.com/timescaledb
๐Ÿ” Twitch โ‡’ https://www.twitch.tv/timescaledb
๐Ÿ” LinkedIn โ‡’ https://www.linkedin.com/company/timescaledb
๐Ÿ” Timescale Blog โ‡’ https://tsdb.co/blog
๐Ÿ” Timescale Documentation โ‡’ https://tsdb.co/docs

๐Ÿ“š ๐—–๐—ต๐—ฎ๐—ฝ๐˜๐—ฒ๐—ฟ๐˜€:
โฑ 0:00 โ‡’ Introduction
โฑ 2:44 โ‡’ Roadmap & motivation: what youโ€™ll learn and why it matters
โฑ 4:37 โ‡’ Why use Postgres for monitoring and analytics?
โฑ 7:18 โ‡’ Demo scenario, real-world dataset, and schema
โฑ 13:32 โ‡’ Function #1: Using Window Functions
โฑ 19:20 โ‡’ Function #2: Using Window Functions & LAG()
โฑ 25:51 โ‡’ Function #3: Using percentile_cont()
โฑ 29:30 โ‡’ TimescaleDB-unique functions (and quick background on TimescaleDB)
โฑ 30:36 โ‡’ Function #4: Using first() or last()
โฑ 34:10 โ‡’ Function #5: Using time_bucket
โฑ 39:16 โ‡’ (Bonus!) Function. #6: Using time_bucket_gapfill(); locf(), interpolate()
โฑ 46:45 โ‡’ Recap & Resources

Exit mobile version