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

Android Leftovers

My Linux story: Coding not required

For more than 15 years, I have earned a living working exclusively with open source products. How did I get here? In many ways, my journey started before Linux existed. In college, I had friends who were admins in the engineering computer lab. Although I did not do too well in my CS programming classes, as a hobby and to spend time with my friends I learned about newgroups, ftp sites, and Unix systems. As a data aide student intern, I realized I made a good translator between the astronomers and the C programmer computer support staff. I could read just enough code to identify the problem, but not enough to actually fix it. Read more

Amazing Facts about Linux Operating System You Probably Don't Know

It was almost 30 years ago when the first version of Linux came into the market and since then, this operating system has made its important stature beside Microsoft Windows. Linux has turned out to be one of the most acknowledged and extensively used operating system. Enthused by UNIX, Linux has smartly managed to attract a lot of tech giants such as Facebook, Google, Yahoo, Twitter, Amazon, and much more. However, when it comes to assessing the exact rate of adoption of Linux in the market, the task is a bit tough since the sources to get copies are wide in number. Appreciating workers' and developers' hard-work, Linux has been designed in such a way that exploring and learning things on this operating system has become quite captivating and enthralling. In this post, let's know more about amazing features and facts of this operating system. Read more

Red Hat News