Language Selection

English French German Italian Portuguese Spanish

PostgreSQL Optimizer Bits: Semi and Anti Joins

Filed under
Software

Since version 8.4, PostgreSQL has been offering a new optimisation strategy for the optimisation of certain queries: Semi and Anti Joins.

A Semi Join is a specific form of a join, which only takes the keys of relation a into account if these are also present in the associated table b. An Anti Join is the negative form of a Semi Join: that is, a key picked in table a will be taken into account if it is not present in table b.

To summarize, Semi and Anti Joins are specific forms of a join which only take certain keys on the left side into account - where queries want to make sure certain keys exist, but are not concerned with the content of the key itself. This behaviour is already widely known in Object Relation Mappers (ORM) which formulate such queries using EXIST() or NOT EXIST().

Read the optimization results here.

More in Tux Machines

Nix This Innovative OS for Its Uninviting Complexity

I had to keep reminding myself that I was not dealing with an extreme case of Arch Linux instead of GNU/Linux. NixOS is more demanding and definitely not a distro for users with anything less than advanced skills. To say NixOS comes with a steep learning curve and lots of hands-on overhead is putting it mildly. If you are a typical Linux user who lacks sysadmin training, avoid NixOS like a malware attack hiding in plain sight. Read more

Riot: A Distributed Way of Having IRC and VOIP Client and Home Server

Riot is a free and open source decentralized instant messaging application that can be considered an alternative to Slack. Take a look at features of Riot, installation procedure and usage. Read more

KDE’s New Elisa Music Player: So Close, Yet So Far Away

KDE is a working on a new music player called Elisa. Can Elisa become the new default music player in most Linux distributions? Find out in this review of Elisa music player. Read more

Collabora Online 3.2 released

Collabora Productivity, the driving force behind putting LibreOffice in the Cloud, is excited to announce a new release of its flagship enterprise-ready cloud document suite – Collabora Online 3.2, with new features and multiple improvements. Read more