Episode 165: Leveraging the Features of Your Database With Postgres and Python
The Real Python Podcast
Jul 21, 2023 1h
Are you getting the most out of your Postgres database? What features could you leverage to improve your Python project? This week on the show, Craig Kerstiens from Crunchy Data is here to discuss getting the most out of Postgres.
Craig shares his years of PostgreSQL expertise with advice on getting more from the platform. We talk about rich data types for describing ranges, geospatial data, and JSON.
Craig shares tools for accessing performance statistics from the command line and strategies for optimizing your terminal settings for SQL searches. He discusses Postgres extensions for customizing the database to your needs. Craig also provides multiple resources for learning more and an online tool for practicing within a playground environment.
Course Spotlight: Creating Web Maps From Your Data With Python Folium
You’ll learn how to create web maps from data using Folium. The package combines Python’s data-wrangling strengths with the data-visualization power of the JavaScript library Leaflet. In this video course, you’ll create and style a choropleth world map showing the ecological footprint per country.
Topics:
- 00:00:00 – Introduction
- 00:02:36 – What are reasons for considering Postgres?
- 00:07:41 – Timeline of recent features
- 00:11:06 – Unique data types
- 00:16:34 – Storing JSON information
- 00:20:19 – Video Course Spotlight
- 00:21:50 – Storing geographic information
- 00:25:16 – What’s the process for adding extensions?
- 00:31:33 – Advice for Python developers using Postgres
- 00:33:31 – Advice on writing SQL
- 00:38:06 – Command-line tools and customizations
- 00:48:18 – Django as an entry to Python
- 00:51:13 – Resources for learning and practicing with Postgres
- 00:53:45 – What are you excited about in the world of Python?
- 00:55:55 – What do you want to learn next?
- 00:58:34 – How can people follow your work online?
- 00:59:20 – Thanks and goodbye
Show Links:
- Craig Kerstiens - Blog
- Trusted Open Source PostgreSQL & Commercial Support for the Enterprise - Crunchy Data
- Why Postgres? - Crunchy Data
- Why Postgres - Craig Kerstiens - YouTube
- A hands on experience with complex SQL - Craig Kerstiens - YouTube
- Ingres (database) - Wikipedia
- PostgreSQL specific model fields - Django documentation
- Psqlrc - PostgreSQL wiki
- The most useful Postgres extension - pg_stat_statements
- High-compression Metrics Storage with Postgres Hyperloglog
- Postgres Playground and Tutorials - Crunchy Data
- PostgreSQL Blog - Crunchy Data
- It’s at least once a week I talk with someone that “loves Postgres” but isn’t sure why… Craig Kerstiens on Twitter:
- The Wok Book: Recipes and Techniques by J. Kenji Lopez-Alt