There are two options to locate a record in one table with no related record in another. In this example I have a customer table containing customers and an invoice table containing invoices.
The following query will display all the record in the customer table with no matching records in the invoice table. It is easy to remember, but the execution of the query is slow.
The next query will give the same result, but it will execute a lot faster because it will use a hash index.
No comments:
Post a Comment