Latest published stories in PostgreSQL - DeveloperSites
1
likes
spam Like Dislike

The Many Faces of DISTINCT in PostgreSQL

published 158 days, 4 hours, 1 minute ago posted by matthewpomarmatthewpomar 167 days, 6 hours, 27 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 2:18:07 PM GMT
I started my programming career as an Oracle DBA. It took a few years but eventually I got fed up with the corporate world and I went about doing my own thing. After I gotten over not having proper partitions and MERGE statement, I found some nice unique features in PostgreSQL. Oddly enough, a lot of them contained the word DISTINCT. (more)
category: PostgreSQL | clicked: 0 | comment | | source: hakibenita.com
tags: SQL
1
likes
spam Like Dislike

Be Careful With CTE in PostgreSQL

published 158 days, 4 hours, 1 minute ago posted by matthewpomarmatthewpomar 167 days, 7 hours, 12 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 1:32:43 PM GMT
PostgreSQL, SQL, PerformanceHow to avoid common pitfalls with common table expressions in PostgreSQL Common table expressions (CTE), also known as the WITH clause, are a very useful feature. They help break down big queries into smaller pieces which makes it easier to read and understand. PostgreSQL Version This article is intended for PostgreSQL versions 11 and prior. Starting at version 12, PostgreSQL changed the way it treats CTE to prevent the issues described in this article.Wha... (more)
category: PostgreSQL | clicked: 0 | comment | | source: hakibenita.com
tags: Performance, SQL
1
likes
spam Like Dislike

How We Solved a Storage Problem in PostgreSQL Without Adding a Single Byte of Storage

published 158 days, 4 hours, 1 minute ago posted by matthewpomarmatthewpomar 167 days, 7 hours, 15 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 1:29:44 PM GMT
A while back we started getting alerts in the middle of the night on low disk space. A quick investigation led us to one of our ETL tasks. Every night the task was fired to eliminate duplicate dumps, and free up some space. This is a short story about how we found our silver bullet and solved the issue without adding a single byte of storage. (more)
category: PostgreSQL | clicked: 0 | comment | | source: hakibenita.com
tags: Performance, SQL
1
likes
spam Like Dislike

Fastest Way to Load Data Into PostgreSQL Using Python

published 158 days, 4 hours, 1 minute ago posted by matthewpomarmatthewpomar 167 days, 7 hours, 27 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 1:18:20 PM GMT
Explore the best way to import messy data from remote source into PostgreSQL using Python and Psycopg2. The data is big, fetched from a remote source, and needs to be cleaned and transformed. (more)
category: PostgreSQL | clicked: 6 | comment | | source: hakibenita.com
tags: Performance, Python
1
likes
spam Like Dislike

How to Get the First or Last Value in a Group Using Group By in SQL

published 158 days, 4 hours, 1 minute ago posted by matthewpomarmatthewpomar 167 days, 7 hours, 27 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 1:17:36 PM GMT
Getting the last value of a group in an aggregated query in PostgreSQL is a challenging task. In this article we present a simple way to get the first or last value of a group using group by. (more)
category: PostgreSQL | clicked: 1 | comment | | source: hakibenita.com
tags: SQL
1
likes
spam Like Dislike

12 Common Mistakes and Missed Optimization Opportunities in SQL

published 158 days, 4 hours, 1 minute ago posted by matthewpomarmatthewpomar 167 days, 7 hours, 32 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 1:12:55 PM GMT
SQL is used by analysts, data scientists, product managers, designers and many others. These professionals have access to databases, but they don't always have the intuition and understanding to write efficient queries. In an effort to make my team write better SQL, I went over reports written by non-developers and code reviews, and gathered common mistakes and missed optimization opportunities in SQL. (more)
category: PostgreSQL | clicked: 0 | comment | | source: hakibenita.com
tags: Performance, SQL
1
likes
spam Like Dislike

The Surprising Impact of Medium-Size Texts on PostgreSQL Performance

published 158 days, 4 hours, 1 minute ago posted by matthewpomarmatthewpomar 167 days, 7 hours, 45 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 1:00:22 PM GMT
Any database schema is likely to have plenty of text fields. In this article I demonstrate the surprising impact of medium-size texts on query performance. (more)
category: PostgreSQL | clicked: 0 | comment | | source: hakibenita.com
tags: Performance, SQL
1
likes
spam Like Dislike

Re-Introducing Hash Indexes in PostgreSQL

published 158 days, 4 hours, 1 minute ago posted by matthewpomarmatthewpomar 167 days, 7 hours, 46 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 12:59:22 PM GMT
There is a type of index you are probably not using, and may have never even heard of. It is wildly unpopular, and until a few PostgreSQL versions ago it was highly discouraged and borderline unusable, but under some circumstances it can out-perform even a B-Tree index. (more)
category: PostgreSQL | clicked: 0 | comment | | source: hakibenita.com
tags: Performance, SQL
1
likes
spam Like Dislike

The Unexpected Find That Freed 20GB of Unused Index Space

published 158 days, 4 hours, 1 minute ago posted by matthewpomarmatthewpomar 167 days, 7 hours, 48 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 12:57:25 PM GMT
In this article I describe the process we took to identify potential free space, and one surprising find that helped up clear up ~10GB of unused indexed values! (more)
category: PostgreSQL | clicked: 2 | comment | | source: hakibenita.com
tags: Django, ORM
1
likes
spam Like Dislike

Practical SQL for Data Analysis

published 158 days, 4 hours, 1 minute ago posted by matthewpomarmatthewpomar 167 days, 7 hours, 49 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 12:56:24 PM GMT
Pandas is by far the most popular tool for data analysis. It's packed with useful features, it's battle tested and widely accepted. However, pandas comes at a cost which is often overlooked. SQL databases has been around since the 1970s. They contain many features that most developers never heard of, and I want to bring some of them to light. (more)
category: PostgreSQL | clicked: 0 | comment | | source: hakibenita.com
tags: SQL
1
likes
spam Like Dislike

18+ Powerful PostgreSQL Features You Didn't Know Existed

published 158 days, 4 hours, 1 minute ago posted by matthewpomarmatthewpomar 167 days, 8 hours, 10 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 12:35:29 PM GMT
PostgreSQL is a powerful, full featured relational database management system. However, this free and open-source DBMS has a surprising number of fantastic features most PostgreSQL developers don't know anything about. In this article, Haki Benita, a renown and respected blogger on PostgreSQL, Python, and related technologies, list more than 18 lesser known PostgreSQL features that can improve your productivity and make your life easier as a PostgreSQL developer or admin. (more)
category: PostgreSQL | clicked: 5 | 1 comment | | source: hakibenita.com
tags: SQL