Re: MySQL Techniques

by "Mike Taylor" <lonewolf(at)one.net>

 Date:  Sun, 8 Dec 2002 14:18:27 -0500
 To:  <hwg-techniques(at)hwg.org>
 References:  yerpso upwebmaestro yerpso2
  todo: View Thread, Original
In ASP, we can use the GetRows method to store the query results into a
two-dimensional array.  Is there anything analogous to that in PHP?  If so,
perhaps that would help Nathan's issue here for subsequent queries (does
nothing for the initial query, though).

Also, what kind of connection is made to the MySQL database?  Is it ODBC or
something else?  When we  use ODBC, we find extremely improved query speed
results when we have the ForwardOnly, ReadOnly cursortypes initiated.  Using
other cursortypes can cause the record to be locked, disallowing anyone else
from querying and basically queuing them up for a chance to get at the same
results.

Finally, what happens when inner joins are used in the query instead of the
query Nathan previously posted?  It would seem the use of a couple nested
inner joins in conjunction with match/against may improve results.  I noted
that his three tables all shared the "MasterID" so they could be joined on
that.

Mike


----- Original Message -----
From: "Nathan Lyle" <nathan(at)upwebmaestro.com>
To: "hwg-techniques" <hwg-techniques(at)hwg.org>; <list(at)webdesign-l.com>
Sent: Saturday, December 07, 2002 6:07 PM
Subject: Re: MySQL Table Size / Techniques (example table structure etc.)

>
> An example of one of the original queries I *had* been sending, before
> using temporary tables would be:
>
> SELECT
> master.Category,master.Number,master.title,artist.Name,track.Title
> FROM master,artist,track WHERE artist.Name LIKE "%John%" AND
> track.Title LIKE "%Love%" AND artist.masterID=master.id AND
> track.masterID=master.id ORDER BY master.Date DESC LIMIT 0,10;
>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA