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

Four Things a New Linux User Should Know

If you’re making the move from Windows or Mac (or even from Android or iOS), welcome to our world. These days, using Linux for doing everyday computer tasks isn’t that much different than using other operating systems — meaning the learning curve is only slight. In fact, my colleague Phil Shapiro works at a library that uses Linux on the computers its patrons use and says that hardly anyone even notices they’re not using Windows. It’s that easy. Read more

Arch Linux-Based ArchEX Has Linux Kernel 4.10.5, Yaourt, and Calamares Installer

Arne Exton announced today the release of a new build of his Arch Linux-based ArchEX GNU/Linux distribution built around the lightweight LXQt desktop environment. Read more

DragonFly BSD 4.8 Released with EFI & eMMC Support, Improved Kernel Performance

The developers of the DragonFly BSD operating system were proud to announce today, March 27, 2017, the release and immediate availability for download of DragonFly BSD 4.8. Read more Also: DragonFlyBSD 4.8 Released With Performance Improvements, EFI Support & More DragonFly BSD 4.8

Lesser known but still handy Linux commands

Some Linux commands that might not be sitting in your top favorites list can still come in very handy in a number of ways. In today's post, we're going to examine some interesting though somewhat unusual command options. Read more