Selena Deckelmann: Why use OVER() instead of a CROSS JOIN?
I’m reimplementing some expensive database queries, moving them from our middleware into materialized view tables. We make pretty extensive use of Common Table Expressions (CTEs). And we generate many...
View ArticleMichael Paquier: Text search with a commonly-known book
Just yesterday on hackers, a post by Kevin Grittner mentionned using pg_trgm to find similar sentences in a text. His example involved using “War and Peace” (which is under the public domain). When...
View ArticleJosh Berkus: Fancy SQL Monday: generate_series() and cross joins
So, here's the situation: you want to create a report which shows totals of registrations by day and by category, and shows zeros for each day and category you don't have any registrations for. Your...
View ArticleHans-Juergen Schoenig: Time in PostgreSQL: The simple way
Time is one of those unloved topics every programmer has already dealt with. Have you ever written a routine heavily depending on time calculations in C, Python, PHP, Perl, or any other language? I am...
View ArticleSelena Deckelmann: Using JSON data type in production with Socorro
Back in June, we started using the JSON datatype in production for Mozilla’s Socorro. Our implementation analyzes Firefox and other Mozilla products, configured with a HBase backend and Postgres...
View ArticleGreg Smith: FDW Scaling at the Washington DC PostgreSQL Users’ Group
Last night the new-ish Washington DC PostgreSQL Users Group re-launched with that name. We had a talk from Stephen Frost about the new scale out possibilities introduced by combing writeable Foreign...
View ArticleCraig Kerstiens: The missing PostgreSQL documentation
For a couple of years I've complained about the Postgres documentation and at the same time paraded it as one of the best sets of documentation I've encountered. In many ways the reason I veer towards...
View ArticleBinod Nepal: MixERP is powered by PostgreSQL Server
We had previously developed an in-house ERP solution for our office and have been using it since few years. We always wanted to release it as open source. That was not possible due to the dependencies...
View ArticleDimitri Fontaine: Migrating from MySQL to PostgreSQL
About the only time when I will accept to work with MySQL is when you need help to migrate away from it because you decided to move to PostgreSQL instead. And it's already been too much of a pain...
View ArticleSzymon Guz: Speeding Up Some FDW Queries
There was a very interesting question about PostgreSQL optimization. It was about speeding up a query on foreign tables.IntroductionLet’s take a couple of tables and a view created on the top of...
View ArticleJosh Berkus: Another reason to set pg_hba.conf restrictively
pg_hba.conf can be a pain in the neck. You're expecting some burst traffic, you deploy 8 new virtual appservers, fire them up, and ... they can't connect to Postgres. Gah! That kind of experience...
View ArticleHans-Juergen Schoenig: Time in PostgreSQL: Outer joins
After my previous posting I received mails asking about what was meant by using “generate_series” in an outer join. Let me try to address this issue to proof my point: Many people are using PostgreSQL...
View ArticleJoshua McDougall: The Schemaverse Championships - DEF CON 21 in Las Vegas
<ExecutiveSummary> Holy crap, that went well. Thnx! </ExecutiveSummary>Did I mention how well this contest went this year? I’m still kind of in awe to be honest. I don’t even know where to...
View ArticleJeff Frost: Get your PgBouncer pools stats into Ganglia
Just whipped up a quick ruby script to put PgBouncer "show pools" data into ganglia using gmetric. Based it heavily off the postgres_gmetric script.You can find the pgbouncer gmetric script here:...
View ArticleDan Scott: A Flask of full-text search in PostgreSQL
On August 10, 2013, I gave the following talk at the PyCon Canada 2013 conference:I’m a systems librarian at Laurentian University.For the past six years, my day job and research have enabled me to...
View ArticleMichael Paquier: Postgres 9.4 feature highlight: dynamic background workers
Following the recent API modifications done in Postgres 9.3 for background worker processes, here is more information about the latest features of background workers currently being developped for...
View ArticleHans-Juergen Schoenig: Reducing the number of columns
After digging through a table consisting of dozens of boolean values I thought it might be helpful to more folks out there to know about bitfields in PostgreSQL. Basically “bit” can be used just as...
View ArticleJosh Berkus: Fancy SQL Monday: ON vs. NATURAL JOIN vs. USING
First, there was the SQL89 JOIN, where there was no JOIN statement, and joins were performed by adding WHERE clauses. To wit:SELECT users.name, count(*)FROM users, commentsWHERE users.user_id =...
View ArticleRikard Pavelic: Multiple result sets alternatives in Postgres
While Postgres’s type system is second to none, Postgres still lacks some features here and there. Stored procedures with their own transaction management are high on that list. But, beside transaction...
View ArticleFabien Coelho: PostgreSQL Warm-up
A database can take some time to reach good performances, the time necessary to OS and database caches to load the necessary data from the hard disk drive. Here is an example with PostgreSQL, which...
View Article