in reply to Re: DBI and MySQL issue
in thread DBI and MySQL issue

And while we are speaking about the query design: Avoid cross joins if possible. Cross joins explode the tables first and apply the "where" clauses afterwards. There is no inherent reason for a cross join as far as I can see.

Replies are listed 'Best First'.
Re^3: DBI and MySQL issue
by tbone1 (Monsignor) on May 03, 2007 at 12:38 UTC
    I have to do it because of the database design (like I said, it's a drupal-based web site), and because, well, because it shouldn't be a big deal to do that. The tables aren't big, they're indexed, and it's probably less overhead than multiple queries. Is there something in MySQL, or not in MySQL, that I should know about? I've been doing this in Ingres/Informix/Oracle for longer than I'd care to admit, so I don't see why it's a big deal.

    --
    tbone1, YAPS (Yet Another Perl Schlub)
    And remember, if he succeeds, so what.
    - Chick McGee

Re^3: DBI and MySQL issue
by herveus (Prior) on May 04, 2007 at 11:27 UTC
    Howdy!

    What are you talking about?

    On the face of it, the query looks like a simple join with suitable criteria. There is no cartesian product begin generated.

    How would you rephrase the query to avoid the problem you allege exists?

    yours,
    Michael