Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: DBI and MySQL issue

by dokkeldepper (Friar)
on May 03, 2007 at 07:29 UTC ( [id://613321]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://613321]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 02:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found