January 2012
Intermediate to advanced
542 pages
11h 28m
English
One of the most time-consuming operations in a database is the JOIN. We use this when we need to join two or more tables due to the normalized structure of the database. There are many types of joins (equi-join, self-join, outer join, anti-join, and so on).
In this recipe, we will see some join algorithms the database can use to answer our queries, performance related to every type of join, and some tricks to avoid joins (when possible).
The following steps will demonstrate some common types of joins:
SH schema:
CONNECT sh@TESTDB/sh
MY_CUSTOMERS as a copy of the CUSTOMERS table:CREATE TABLE sh.MY_CUSTOMERS AS SELECT * FROM sh.CUSTOMERS; ALTER TABLE sh.MY_CUSTOMERS ADD CONSTRAINT ...
Read now
Unlock full access