Monthly Archives: January 2017

Perfect hash function for weekday names

This is probably only of limited usefulness in practice, but it came as a spinoff from a discussion on #postgresql. The basic problem is, given a string which you already know is an English weekday name, return the day number … Continue reading

Posted in PlanetPG, Postgres, SQL | 7 Comments

Performance issues with ORed conditions

An issue that comes up from time to time on the IRC channel is performance optimization of queries that contain ORed conditions. Here is a summary of the common problems and some solutions.

Posted in PlanetPG, Postgres, SQL | 2 Comments