| hwg-techniques archives | Jan 2002 | new search | results | previous | next |
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