Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8561707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:33:44+00:00 2026-06-11T16:33:44+00:00

At http://dev.mysql.com/doc/refman/5.5/en/left-join-optimization.html one can read: If you use LEFT JOIN to find rows that

  • 0

At http://dev.mysql.com/doc/refman/5.5/en/left-join-optimization.html one can read:

If you use LEFT JOIN to find rows that do not exist in some table and
you have the following test: col_name IS NULL in the WHERE part, where
col_name is a column that is declared as NOT NULL, MySQL stops
searching for more rows (for a particular key combination) after it
has found one row that matches the LEFT JOIN condition.

Can any body explain me what that mean in a human readable language? or in a newbie readable language 😉

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:33:45+00:00Added an answer on June 11, 2026 at 4:33 pm

    A left join always joins at least one row in the right-hand table for each row in the left-hand table, even if there are no rows in the right-hand table that match the join condition. If this happens, then the columns from the right-hand table for that row will all be null.

    This means that performing a left join and then testing for null (in a not null column) in a right hand table column is an effective idiom for testing for rows that have no corresponding row in the joined table.

    The excerpt you quote is saying that MySQL is intelligent enough when carrying out a query of this form to stop joining more rows from the right-hand table once the first one has been joined (because it would be a waste of time to do so – you’ve made it clear that you are looking for rows with no match in the right-hand table, so looking for more rows once at least one has been found would serve no purpose).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From here: http://dev.mysql.com/doc/refman/5.0/en/order-by-optimization.html In some cases, MySQL can use an index to satisfy an
I have read the documentation ( http://dev.mysql.com/doc/refman/5.1/en/partitioning.html ), but I would like, in your
i want to use alter table but the syntax posted here: http://dev.mysql.com/doc/refman/5.1/en/alter-table.html is very
Is there a way to use a http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_not-in with Kohana's ORM? Something like: $products
I read the official page: http://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html but it's not providing an example I have
I was reading this page http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html there is one line printf([%.*s] , (int) lengths[i],
Mysql supports prepared statements in this way: http://dev.mysql.com/doc/refman/5.0/en/sql-syntax-prepared-statements.html Is there a support for it
On the manual page; http://dev.mysql.com/doc/refman/5.0/en/mysql-insert-id.html It is said that Returns the value generated for
There is a statement in the MySQL Docs ( http://dev.mysql.com/doc/refman/5.0/en/adding-udf.html ) that is bothering
I have a mysql fulltext question. Refrence on: http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html SELECT * FROM table WHERE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.