Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2004
    Posts
    26

    Unanswered: JOIN rows produced vs rows read

    On a 3 table join where MySQL predicts rows for each table to be 10-2-1 (tables A-B-C; type index-ref-eq_ref) the total rows produced is the product of these values, 20.

    However, isn't the number of rows read (i.e., individual rows fetched by MySQL to construct the joined rows) 50: 10 from table A, plus 2 for each of these 10, plus 1 for each of combination of B and A?

    Thanks.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    actually i think the number of rows read is 13
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Dec 2004
    Posts
    26
    Regarding eq_ref for example the manual says "One row will be read from this table for each combination of rows from the previous tables." I took 'each combination ...' to mean like A1-B1, A1-B2, A1-B3, etc. ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •