Month: February 2015
PostgreSQL 9.4 aggregate filter clauses: They do pay off
In my previous posting on PostgreSQL 9.4 I wrote about aggregate FILTER clauses, which are a neat way to make partial aggregates more readable. Inspired by some comments to this blog post I decided to create a follow-up post, to see the impact this new FILTER clause has on performance. Loading some demo data To see […]
Partial aggregation: The beautiful way
Partial aggregation: Aggregations are a fundamental feature of SQL. Functions such as min, max, count, sum, avg and so on are used in virtually every application – it is basically impossible to write a reasonably complex applications without them. Here is a trivial aggregate: All it does is summing up numbers from 1 to 10: […]
Earthdistance: From Saigon to Frankfurt
On my way back from Vietnam I was watching the screen in front of me displaying the “Distance to destination”. On such a long flight the number you see in front of you can be quite depressing so I spent some time to figure out how this number could be calculated with PostgreSQL. Earthdistance comes […]
Geocoding: Entertaining results
Recently I was working on a project which had a need for geocoding. Normally we use PostGIS along with some free data for geocoding. However, to cross check data and to verify results I decided to write a little Python function to see what Google would actually give me. To come up with the Python […]