Re: MySQL Queries (OT?)

by Frank Boumphrey <bckman(at)ix.netcom.com>

 Date:  Tue, 15 Jan 2002 00:47:29 -0500
 To:  HWG Techniques Email List <hwg-techniques(at)hwg.org>,
Nathan <natelyle(at)chartermi.net>
 References: 
  todo: View Thread, Original
If you are using joins for three tables then it will be slow!

If you have 1000 records in each table, you are essentially looking at
1000^3 , or one billion operations for your search!

You seem to be dealing with an OLAP type DB here, so you don't have to worry
to much about rationalising your DB (As you would in a transactional DB), so
if you can cut out one table you will definately speed up your search by a
large factor.

Other things to look for,
make sure you don't have a loop inside a loop for your search.

Frank

----- Original Message -----
From: "Nathan" <natelyle(at)chartermi.net>
To: "HWG Techniques Email List" <hwg-techniques(at)hwg.org>
Sent: Monday, January 14, 2002 7:37 PM
Subject: MySQL Queries (OT?)


> I'm working on putting together a music database for a local radio
station,
> using PHP and MySQL and am having problems getting the sort of query I
want
> to work fast enough... but I'm not sure if this is "list-appropriate" as
> far as a topic. My problem is basically that even using Indexes, I can't
> get info from 3 tables to relate fast enough to be practical. I think my
> best time so far is 34 seconds, which to anyone using a browser, is an
> eternity. :-{
>
> Anyway, if anyone out there is a whiz at writing queries or can tell me if
> the topic is an appropriate one I can elaborate further either on or off
> list. <fingers crossed>
>
> ~ Nathan Lyle
>
> Email: natelyle(at)chartermi.net
> Phone: (906)485-4806
> http://www.nathanlyle.com
>
> "Those that can give up essential liberty to obtain a little temporary
> safety deserve neither liberty nor safety." - Ben Franklin
>
>

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

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.