[thelist] [best practices] Join queries in MySQL?

Ken Schaefer ken at adOpenStatic.com
Tue Nov 26 19:08:01 CST 2002


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "rudy" <r937 at interlog.com>
Subject: Re: [thelist] [best practices] Join queries in MySQL?


: however, i would be really curious to see if your so-called "senior"
: php/mysql guy actually ran any tests himself (and if he did, what version
of
: mysql he was using)
:
: my gut instinct tells me he's wrong -- very very wrong -- to suggest that
: calling the database repetitively from inside a loop is going to be faster
: than a join

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I concur with Rudy's analysis. All modern relational databases work using
relational algebra/set theory. Cursors on the other hand, are something that
humans are partial to, since it helps us work with data.

I would be *very* surprised if a database like mySQL worked better by
extracting records, and looping through them, accessing the database many
times, once for each record...

Cheers
Ken




More information about the thelist mailing list